[C++11] Replacing CallArgList writeback iterators with iterator_range writebacks(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions.

llvm-svn: 204062
This commit is contained in:
Aaron Ballman 2014-03-17 17:22:27 +00:00
parent 804a7fb7ba
commit 36a7fa80ab
2 changed files with 8 additions and 6 deletions

View File

@ -2015,9 +2015,8 @@ static void emitWriteback(CodeGenFunction &CGF,
static void emitWritebacks(CodeGenFunction &CGF,
const CallArgList &args) {
for (CallArgList::writeback_iterator
i = args.writeback_begin(), e = args.writeback_end(); i != e; ++i)
emitWriteback(CGF, *i);
for (const auto &I : args.writebacks())
emitWriteback(CGF, I);
}
static void deactivateArgCleanupsBeforeCall(CodeGenFunction &CGF,

View File

@ -99,9 +99,12 @@ namespace CodeGen {
bool hasWritebacks() const { return !Writebacks.empty(); }
typedef SmallVectorImpl<Writeback>::const_iterator writeback_iterator;
writeback_iterator writeback_begin() const { return Writebacks.begin(); }
writeback_iterator writeback_end() const { return Writebacks.end(); }
typedef llvm::iterator_range<SmallVectorImpl<Writeback>::const_iterator>
writeback_const_range;
writeback_const_range writebacks() const {
return writeback_const_range(Writebacks.begin(), Writebacks.end());
}
void addArgCleanupDeactivation(EHScopeStack::stable_iterator Cleanup,
llvm::Instruction *IsActiveIP) {