diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-12 22:31:35 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-12 22:31:35 +0000 |
| commit | 73d5aae74c3a6ad1e56cd933e565617ca052d9eb (patch) | |
| tree | a4041e15e5a4090318592510a6891df796b9403f /llvm/lib | |
| parent | 2fcf60e78efde7b9766bb58dd2fcf0b5773d75ee (diff) | |
| download | bcm5719-llvm-73d5aae74c3a6ad1e56cd933e565617ca052d9eb.tar.gz bcm5719-llvm-73d5aae74c3a6ad1e56cd933e565617ca052d9eb.zip | |
Bitcode: Range-based for, NFC
llvm-svn: 225713
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 1741d0363b2..8854ee81d17 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -799,16 +799,16 @@ static void WriteModuleMetadata(const Module *M, } SmallVector<uint64_t, 64> Record; - for (unsigned i = 0, e = MDs.size(); i != e; ++i) { - if (const MDNode *N = dyn_cast<MDNode>(MDs[i])) { + for (const Metadata *MD : MDs) { + if (const MDNode *N = dyn_cast<MDNode>(MD)) { WriteMDNode(N, VE, Stream, Record); continue; } - if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MDs[i])) { + if (const auto *MDC = dyn_cast<ConstantAsMetadata>(MD)) { WriteValueAsMetadata(MDC, VE, Stream, Record); continue; } - const MDString *MDS = cast<MDString>(MDs[i]); + const MDString *MDS = cast<MDString>(MD); // Code: [strchar x N] Record.append(MDS->bytes_begin(), MDS->bytes_end()); |

