summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2019-12-31 10:55:07 -0600
committerJohannes Doerfert <johannes@jdoerfert.de>2019-12-31 10:55:07 -0600
commitdf3b56c90544b17e645bcb1799ce60e3ae1d5c6d (patch)
tree870be21f918d964115f59b621925f61c6221d915
parent7adb5c2aca8047ae184a96869e3cfcb034fbac39 (diff)
downloadbcm5719-llvm-df3b56c90544b17e645bcb1799ce60e3ae1d5c6d.tar.gz
bcm5719-llvm-df3b56c90544b17e645bcb1799ce60e3ae1d5c6d.zip
[Attributor][Fix] Avoid leaking memory after D68765
-rw-r--r--llvm/include/llvm/Transforms/IPO/Attributor.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 3f4087b9c95..1aafab028ba 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -694,7 +694,11 @@ struct Attributor {
: InfoCache(InfoCache), DepRecomputeInterval(DepRecomputeInterval),
Whitelist(Whitelist) {}
- ~Attributor() { DeleteContainerPointers(AllAbstractAttributes); }
+ ~Attributor() {
+ DeleteContainerPointers(AllAbstractAttributes);
+ for (auto &It : ArgumentReplacementMap)
+ DeleteContainerPointers(It.second);
+ }
/// Run the analyses until a fixpoint is reached or enforced (timeout).
///
OpenPOWER on IntegriCloud