[llvm] r250181 - BitcodeReader: Remove ilist iterator implicit conversions, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 09:48:55 PDT 2015
Author: dexonsmith
Date: Tue Oct 13 11:48:55 2015
New Revision: 250181
URL: http://llvm.org/viewvc/llvm-project?rev=250181&view=rev
Log:
BitcodeReader: Remove ilist iterator implicit conversions, NFC
Get LLVMBitReader building without relying on `ilist_iterator` implicit
conversions.
Modified:
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=250181&r1=250180&r2=250181&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Tue Oct 13 11:48:55 2015
@@ -2866,7 +2866,7 @@ std::error_code BitcodeReader::parseCons
return error("Invalid ID");
++BBI;
}
- BB = BBI;
+ BB = &*BBI;
} else {
// Otherwise insert a placeholder and remember it so it can be inserted
// when the function is parsed.
@@ -3720,8 +3720,8 @@ std::error_code BitcodeReader::parseFunc
unsigned ModuleMDValueListSize = MDValueList.size();
// Add all the function arguments to the value table.
- for(Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
- ValueList.push_back(I);
+ for (Argument &I : F->args())
+ ValueList.push_back(&I);
unsigned NextValueNo = ValueList.size();
BasicBlock *CurBB = nullptr;
@@ -5103,9 +5103,8 @@ std::error_code BitcodeReader::materiali
// Iterate over the module, deserializing any functions that are still on
// disk.
- for (Module::iterator F = TheModule->begin(), E = TheModule->end();
- F != E; ++F) {
- if (std::error_code EC = materialize(F))
+ for (Function &F : *TheModule) {
+ if (std::error_code EC = materialize(&F))
return EC;
}
// At this point, if there are any function bodies, parse the rest of
More information about the llvm-commits
mailing list