From: Duncan P. N. Exon Smith Date: Mon, 12 Jan 2015 22:35:34 +0000 (+0000) Subject: Bitcode: Range-based for, NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e73fc94f023b3446c0d341706d4fcb52f31f24ab;p=oota-llvm.git Bitcode: Range-based for, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225716 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 8e1610982c4..9d14a1afb61 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -836,8 +836,8 @@ static void WriteModuleMetadata(const Module *M, Record.clear(); // Write named metadata operands. - for (unsigned i = 0, e = NMD.getNumOperands(); i != e; ++i) - Record.push_back(VE.getMetadataID(NMD.getOperand(i))); + for (const MDNode *N : NMD.operands()) + Record.push_back(VE.getMetadataID(N)); Stream.EmitRecord(bitc::METADATA_NAMED_NODE, Record, 0); Record.clear(); }