mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
llvm-symbolizer: don't leave dangling pointers after flushing LLVMSymbolizer. Add a destructor.
llvm-svn: 185154
This commit is contained in:
parent
225b8ce2e7
commit
8a74ed4a71
@ -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) {
|
||||
|
@ -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).
|
||||
|
Loading…
Reference in New Issue
Block a user