summaryrefslogtreecommitdiffstats
path: root/tools/llvm-symbolizer
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2013-03-19 10:24:42 +0000
committerDmitry Vyukov <dvyukov@google.com>2013-03-19 10:24:42 +0000
commite9e10d18df7ba3ec65c37eaa25131fbd5c1b130e (patch)
treea1cad1ef97694378fa3011fb812e2c7a156df1e2 /tools/llvm-symbolizer
parent974cdfb17a08abae3ba5850bc1a1c801f41319c1 (diff)
downloadexternal_llvm-e9e10d18df7ba3ec65c37eaa25131fbd5c1b130e.zip
external_llvm-e9e10d18df7ba3ec65c37eaa25131fbd5c1b130e.tar.gz
external_llvm-e9e10d18df7ba3ec65c37eaa25131fbd5c1b130e.tar.bz2
llvm-symbolizer: flush internal caches functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-symbolizer')
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.cpp4
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp
index 86ea34b..52ae49c 100644
--- a/tools/llvm-symbolizer/LLVMSymbolize.cpp
+++ b/tools/llvm-symbolizer/LLVMSymbolize.cpp
@@ -186,6 +186,10 @@ std::string LLVMSymbolizer::symbolizeData(const std::string &ModuleName,
return ss.str();
}
+void LLVMSymbolizer::flush() {
+ Modules.clear();
+}
+
// Returns true if the object endianness is known.
static bool getObjectEndianness(const ObjectFile *Obj, bool &IsLittleEndian) {
// FIXME: Implement this when libLLVMObject allows to do it easily.
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.h b/tools/llvm-symbolizer/LLVMSymbolize.h
index e6220aa..0733dfb 100644
--- a/tools/llvm-symbolizer/LLVMSymbolize.h
+++ b/tools/llvm-symbolizer/LLVMSymbolize.h
@@ -50,6 +50,7 @@ public:
symbolizeCode(const std::string &ModuleName, uint64_t ModuleOffset);
std::string
symbolizeData(const std::string &ModuleName, uint64_t ModuleOffset);
+ void flush();
private:
ModuleInfo *getOrCreateModuleInfo(const std::string &ModuleName);
std::string printDILineInfo(DILineInfo LineInfo) const;