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
This commit is contained in:
Victor Hernandez 2010-01-26 18:57:53 +00:00
parent 155eec7fa9
commit d044612489

View File

@ -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();