diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-17 18:10:01 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-17 18:10:01 +0000 |
commit | ec47bc2baef059cd7ebb8c3befbb3aa6c9bb8ff5 (patch) | |
tree | ac9d8d846da836b9da2995dda9a073e1b9dcd3cd /clang/lib/CodeGen/CGCall.cpp | |
parent | 0a9741dce081051f50e8a9d3bd087430cbc1b11d (diff) | |
download | bcm5719-llvm-ec47bc2baef059cd7ebb8c3befbb3aa6c9bb8ff5.tar.gz bcm5719-llvm-ec47bc2baef059cd7ebb8c3befbb3aa6c9bb8ff5.zip |
[C++11] Replacing CGFunctionInfo arg iterators with iterator_range arguments(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 204068
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index c068a11ad66..6d5324d4a13 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -497,10 +497,9 @@ CodeGenTypes::arrangeLLVMFunctionInfo(CanQualType resultType, if (retInfo.canHaveCoerceToType() && retInfo.getCoerceToType() == 0) retInfo.setCoerceToType(ConvertType(FI->getReturnType())); - for (CGFunctionInfo::arg_iterator I = FI->arg_begin(), E = FI->arg_end(); - I != E; ++I) - if (I->info.canHaveCoerceToType() && I->info.getCoerceToType() == 0) - I->info.setCoerceToType(ConvertType(I->type)); + for (auto &I : FI->arguments()) + if (I.info.canHaveCoerceToType() && I.info.getCoerceToType() == 0) + I.info.setCoerceToType(ConvertType(I.type)); bool erased = FunctionsBeingProcessed.erase(FI); (void)erased; assert(erased && "Not in set?"); @@ -1169,10 +1168,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, llvm::AttributeSet::ReturnIndex, RetAttrs)); - for (CGFunctionInfo::const_arg_iterator it = FI.arg_begin(), - ie = FI.arg_end(); it != ie; ++it) { - QualType ParamType = it->type; - const ABIArgInfo &AI = it->info; + for (const auto &I : FI.arguments()) { + QualType ParamType = I.type; + const ABIArgInfo &AI = I.info; llvm::AttrBuilder Attrs; if (AI.getPaddingType()) { |