mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-19 19:31:50 +00:00
llvm-symbolizer: don't leave dangling pointers after flushing LLVMSymbolizer. Add a destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8c6e3248e9
commit
0ed872cdd1
@ -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…
x
Reference in New Issue
Block a user