summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-13 16:48:55 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-13 16:48:55 +0000
commitfb1743a32e58bb60baa1a8797a361709f921a144 (patch)
tree113b40872eb3518fdb311acb59cf2e983dfa7b7c /llvm/lib/Bitcode
parent1fa5c4b944c0969bc409705678a9bcc2f7de2c7c (diff)
downloadbcm5719-llvm-fb1743a32e58bb60baa1a8797a361709f921a144.tar.gz
bcm5719-llvm-fb1743a32e58bb60baa1a8797a361709f921a144.zip
BitcodeReader: Remove ilist iterator implicit conversions, NFC
Get LLVMBitReader building without relying on `ilist_iterator` implicit conversions. llvm-svn: 250181
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index fb853b59844..604cbe37c64 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -2866,7 +2866,7 @@ std::error_code BitcodeReader::parseConstants() {
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::parseFunctionBody(Function *F) {
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::materializeModule(Module *M) {
// 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
OpenPOWER on IntegriCloud