summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.cpp2
-rw-r--r--tools/llvm-symbolizer/LLVMSymbolize.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp
index 59564161b4..57f34c2472 100644
--- a/tools/llvm-symbolizer/LLVMSymbolize.cpp
+++ b/tools/llvm-symbolizer/LLVMSymbolize.cpp
@@ -202,6 +202,8 @@ std::string LLVMSymbolizer::symbolizeData(const std::string &ModuleName,
void LLVMSymbolizer::flush() {
DeleteContainerSeconds(Modules);
DeleteContainerPointers(ParsedBinariesAndObjects);
+ BinaryForPath.clear();
+ ObjectFileForArch.clear();
}
static std::string getDarwinDWARFResourceForPath(const std::string &Path) {
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.h b/tools/llvm-symbolizer/LLVMSymbolize.h
index d1f2285aa8..03c765cc9c 100644
--- a/tools/llvm-symbolizer/LLVMSymbolize.h
+++ b/tools/llvm-symbolizer/LLVMSymbolize.h
@@ -48,6 +48,9 @@ public:
};
LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {}
+ ~LLVMSymbolizer() {
+ flush();
+ }
// Returns the result of symbolization for module name/offset as
// a string (possibly containing newlines).