From e73fc94f023b3446c0d341706d4fcb52f31f24ab Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 12 Jan 2015 22:35:34 +0000 Subject: [PATCH] Bitcode: Range-based for, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225716 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Writer/BitcodeWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } -- 2.34.1