diff options
author | Victor Hernandez <vhernandez@apple.com> | 2010-01-26 18:57:53 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2010-01-26 18:57:53 +0000 |
commit | d044612489c567b9ba35dc0f6fa0d3b12d78bc59 (patch) | |
tree | c20019fdef17d84f9a99d01477329b99805e20be /lib/Transforms/Utils/PromoteMemoryToRegister.cpp | |
parent | 155eec7fa9f39e02ffcdfb2fd646680bf20f4047 (diff) |
Switch AllocaDbgDeclares to SmallVector and don't leak DIFactory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/PromoteMemoryToRegister.cpp')
-rw-r--r-- | lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index f6cb71a223..221abd63b8 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -203,7 +203,7 @@ namespace { /// AllocaDbgDeclares - For each alloca, we keep track of the dbg.declare /// intrinsic that describes it, if any, so that we can convert it to a /// dbg.value intrinsic if the alloca gets promoted. - std::vector<DbgDeclareInst*> AllocaDbgDeclares; + SmallVector<DbgDeclareInst*, 8> AllocaDbgDeclares; /// Visited - The set of basic blocks the renamer has already visited. /// @@ -219,6 +219,9 @@ namespace { PromoteMem2Reg(const std::vector<AllocaInst*> &A, DominatorTree &dt, DominanceFrontier &df, AliasSetTracker *ast) : Allocas(A), DT(dt), DF(df), DIF(0), AST(ast) {} + ~PromoteMem2Reg() { + if (DIF) delete DIF; + } void run(); |