ahatanak added inline comments. ================ Comment at: lib/CodeGen/CodeGenFunction.cpp:1954 @@ +1953,3 @@ + // Erase all allocas and their users. + for (auto I = EntryBB->begin(); &*I != &*AllocaInsertPt; ++I) + if (auto Alloca = dyn_cast<llvm::AllocaInst>(&*I)) ---------------- hans wrote: > would declaring I as llvm::Instruction* allow you to get rid off the "&*" > stuff here and below? If so, same for "auto BB" further down. We can git rid of the "&*" in the code here if we declare I as Instruction*, but we will need to add "&*" to Entry->begin() to convert it to an Instruction*. In addition, we will have to use getNextNode instead of ++II or I++, so it seems to me that using an iterator is better in this case.
http://reviews.llvm.org/D15599 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits