projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f64aa7
)
Plug memory leaks in AsmWriterEmitter::EmitPrintAliasInstruction.
author
Yaron Keren
<yaron.keren@gmail.com>
Thu, 6 Aug 2015 13:18:59 +0000
(13:18 +0000)
committer
Yaron Keren
<yaron.keren@gmail.com>
Thu, 6 Aug 2015 13:18:59 +0000
(13:18 +0000)
llvm-svn: 244212
llvm/utils/TableGen/AsmWriterEmitter.cpp
patch
|
blob
|
history
diff --git
a/llvm/utils/TableGen/AsmWriterEmitter.cpp
b/llvm/utils/TableGen/AsmWriterEmitter.cpp
index
8163f68
..
7e52e97
100644
(file)
--- a/
llvm/utils/TableGen/AsmWriterEmitter.cpp
+++ b/
llvm/utils/TableGen/AsmWriterEmitter.cpp
@@
-1099,6
+1099,14
@@
void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
}
O << "#endif // PRINT_ALIAS_INSTR\n";
+
+ // Free allocated memory.
+ for (auto &Aliases : AliasMap)
+ for (auto &Alias : Aliases.second)
+ delete Alias.first;
+ for (auto &P : IAPrinterMap)
+ for (IAPrinter* IAP : P.second)
+ delete IAP;
}
AsmWriterEmitter::AsmWriterEmitter(RecordKeeper &R) : Records(R), Target(R) {