mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
There is not any need to copy metadata while merging modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80941 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -395,14 +395,8 @@ static Value *RemapOperand(const Value *In,
|
||||
assert(!isa<GlobalValue>(CPV) && "Unmapped global?");
|
||||
llvm_unreachable("Unknown type of derived type constant value!");
|
||||
}
|
||||
} else if (const MDNode *N = dyn_cast<MDNode>(In)) {
|
||||
std::vector<Value*> Elems;
|
||||
for (unsigned i = 0, e = N->getNumElements(); i !=e; ++i)
|
||||
Elems.push_back(RemapOperand(N->getElement(i), ValueMap, Context));
|
||||
if (!Elems.empty())
|
||||
Result = MDNode::get(Context, &Elems[0], Elems.size());
|
||||
} else if (const MDString *MDS = dyn_cast<MDString>(In)) {
|
||||
Result = MDString::get(Context, MDS->getString());
|
||||
} else if (isa<MetadataBase>(In)) {
|
||||
Result = const_cast<Value*>(In);
|
||||
} else if (isa<InlineAsm>(In)) {
|
||||
Result = const_cast<Value*>(In);
|
||||
}
|
||||
|
Reference in New Issue
Block a user