aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-symbolizer
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-symbolizer')
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.cpp5
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp
index 86ea34bff6..29d91a0e92 100644
--- a/tools/llvm-symbolizer/LLVMSymbolize.cpp
+++ b/tools/llvm-symbolizer/LLVMSymbolize.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "LLVMSymbolize.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Object/MachO.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Path.h"
@@ -186,6 +187,10 @@ std::string LLVMSymbolizer::symbolizeData(const std::string &ModuleName,
return ss.str();
}
+void LLVMSymbolizer::flush() {
+ DeleteContainerSeconds(Modules);
+}
+
// 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 e6220aa4ce..0733dfbbc5 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;