mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 18:34:09 +00:00
Bitcode: Range-based for, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f3e42b3baf
commit
442539c468
@ -818,20 +818,17 @@ static void WriteModuleMetadata(const Module *M,
|
||||
}
|
||||
|
||||
// Write named metadata.
|
||||
for (Module::const_named_metadata_iterator I = M->named_metadata_begin(),
|
||||
E = M->named_metadata_end(); I != E; ++I) {
|
||||
const NamedMDNode *NMD = I;
|
||||
|
||||
for (const NamedMDNode &NMD : M->named_metadata()) {
|
||||
// Write name.
|
||||
StringRef Str = NMD->getName();
|
||||
StringRef Str = NMD.getName();
|
||||
for (unsigned i = 0, e = Str.size(); i != e; ++i)
|
||||
Record.push_back(Str[i]);
|
||||
Stream.EmitRecord(bitc::METADATA_NAME, Record, 0/*TODO*/);
|
||||
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 (unsigned i = 0, e = NMD.getNumOperands(); i != e; ++i)
|
||||
Record.push_back(VE.getMetadataID(NMD.getOperand(i)));
|
||||
Stream.EmitRecord(bitc::METADATA_NAMED_NODE, Record, 0);
|
||||
Record.clear();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user