diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-13 17:51:03 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-13 17:51:03 +0000 |
commit | 1732340bfa11a27619e816c8b689d352392b8dce (patch) | |
tree | 5323f02d3cc992de1cc20d6952e10a826b0f70c9 /llvm/lib/Transforms/IPO/MergeFunctions.cpp | |
parent | e82c286fba51ffabd4979cedb3a3b2c9b02ec0f4 (diff) | |
download | llvm-1732340bfa11a27619e816c8b689d352392b8dce.zip llvm-1732340bfa11a27619e816c8b689d352392b8dce.tar.gz llvm-1732340bfa11a27619e816c8b689d352392b8dce.tar.bz2 |
IPO: Remove implicit ilist iterator conversions, NFC
llvm-svn: 250187
Diffstat (limited to 'llvm/lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index 8b7db54..762741b 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -1121,7 +1121,7 @@ int FunctionComparator::cmpBasicBlocks(const BasicBlock *BBL, BasicBlock::const_iterator InstR = BBR->begin(), InstRE = BBR->end(); do { - if (int Res = cmpValues(InstL, InstR)) + if (int Res = cmpValues(&*InstL, &*InstR)) return Res; const GetElementPtrInst *GEPL = dyn_cast<GetElementPtrInst>(InstL); @@ -1139,7 +1139,7 @@ int FunctionComparator::cmpBasicBlocks(const BasicBlock *BBL, if (int Res = cmpGEPs(GEPL, GEPR)) return Res; } else { - if (int Res = cmpOperations(InstL, InstR)) + if (int Res = cmpOperations(&*InstL, &*InstR)) return Res; assert(InstL->getNumOperands() == InstR->getNumOperands()); @@ -1207,7 +1207,7 @@ int FunctionComparator::compare() { ArgRI = FnR->arg_begin(), ArgLE = FnL->arg_end(); ArgLI != ArgLE; ++ArgLI, ++ArgRI) { - if (cmpValues(ArgLI, ArgRI) != 0) + if (cmpValues(&*ArgLI, &*ArgRI) != 0) llvm_unreachable("Arguments repeat!"); } @@ -1658,9 +1658,8 @@ void MergeFunctions::writeThunk(Function *F, Function *G) { SmallVector<Value *, 16> Args; unsigned i = 0; FunctionType *FFTy = F->getFunctionType(); - for (Function::arg_iterator AI = NewG->arg_begin(), AE = NewG->arg_end(); - AI != AE; ++AI) { - Args.push_back(createCast(Builder, (Value*)AI, FFTy->getParamType(i))); + for (Argument & AI : NewG->args()) { + Args.push_back(createCast(Builder, &AI, FFTy->getParamType(i))); ++i; } |