llvm-symbolizer: flush internal caches functionality
authorDmitry Vyukov <dvyukov@google.com>
Tue, 19 Mar 2013 10:24:42 +0000 (10:24 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 19 Mar 2013 10:24:42 +0000 (10:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177390 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-symbolizer/LLVMSymbolize.cpp
tools/llvm-symbolizer/LLVMSymbolize.h

index 86ea34bff6f17d573e6213f65a9039f5bae9b263..52ae49c0f178da72d744495d6f5b31fbf90f9154 100644 (file)
@@ -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.
index e6220aa4ce9c86018ec469bdc730a8204c5720df..0733dfbbc52e1ef7938e51bb892a7c20980decea 100644 (file)
@@ -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;