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 | 9ecd2f039fd5a6e1a27bc9b9a008a09261d21661 (patch) | |
| tree | 0e3a862a47335e337b724a7ff703524352db35ff /llvm/lib/Transforms/Utils | |
| parent | 497c0a418d6fbafea7317f01c700d7d210cf981c (diff) | |
| download | bcm5719-llvm-9ecd2f039fd5a6e1a27bc9b9a008a09261d21661.tar.gz bcm5719-llvm-9ecd2f039fd5a6e1a27bc9b9a008a09261d21661.zip | |
Switch AllocaDbgDeclares to SmallVector and don't leak DIFactory
llvm-svn: 94567
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index f6cb71a2233..221abd63b8d 100644 --- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/llvm/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(); |

