summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d86cef)
raw | patch | inline | side by side (parent: 8d86cef)
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | |
Mon, 12 Jan 2015 22:31:35 +0000 (22:31 +0000) | ||
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | |
Mon, 12 Jan 2015 22:31:35 +0000 (22:31 +0000) |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225713 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/BitcodeWriter.cpp | patch | blob | history |
index 1741d0363b20d45778dcd549b8807db05e750271..8854ee81d1784b7e2320a42c112ad24da3f7d5df 100644 (file)
}
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());