mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 01:25:10 +00:00
IR: Remove dead code in metadata bitcode writing, NFC
No one cares how many uses each metadata value has, so don't bother counting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -756,13 +756,13 @@ static void WriteMDNode(const MDNode *N,
|
||||
static void WriteModuleMetadata(const Module *M,
|
||||
const ValueEnumerator &VE,
|
||||
BitstreamWriter &Stream) {
|
||||
const ValueEnumerator::ValueList &Vals = VE.getMDValues();
|
||||
const auto &Vals = VE.getMDValues();
|
||||
bool StartedMetadataBlock = false;
|
||||
unsigned MDSAbbrev = 0;
|
||||
SmallVector<uint64_t, 64> Record;
|
||||
for (unsigned i = 0, e = Vals.size(); i != e; ++i) {
|
||||
|
||||
if (const MDNode *N = dyn_cast<MDNode>(Vals[i].first)) {
|
||||
if (const MDNode *N = dyn_cast<MDNode>(Vals[i])) {
|
||||
if (!N->isFunctionLocal() || !N->getFunction()) {
|
||||
if (!StartedMetadataBlock) {
|
||||
Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3);
|
||||
@@ -770,7 +770,7 @@ static void WriteModuleMetadata(const Module *M,
|
||||
}
|
||||
WriteMDNode(N, VE, Stream, Record);
|
||||
}
|
||||
} else if (const MDString *MDS = dyn_cast<MDString>(Vals[i].first)) {
|
||||
} else if (const MDString *MDS = dyn_cast<MDString>(Vals[i])) {
|
||||
if (!StartedMetadataBlock) {
|
||||
Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3);
|
||||
|
||||
|
Reference in New Issue
Block a user