mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-24 21:25:41 +00:00
IR: Cleanup MDNode::MDNode(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b0617860b5
commit
898c48822f
@ -403,20 +403,19 @@ MDNode::MDNode(LLVMContext &Context, unsigned ID, StorageType Storage,
|
||||
for (unsigned I = 0, E = MDs.size(); I != E; ++I)
|
||||
setOperand(I, MDs[I]);
|
||||
|
||||
if (isTemporary())
|
||||
this->Context.makeReplaceable(
|
||||
make_unique<ReplaceableMetadataImpl>(Context));
|
||||
|
||||
if (!isUniqued())
|
||||
if (isDistinct())
|
||||
return;
|
||||
|
||||
// Check whether any operands are unresolved, requiring re-uniquing.
|
||||
unsigned NumUnresolved = countUnresolvedOperands();
|
||||
if (!NumUnresolved)
|
||||
return;
|
||||
if (isUniqued()) {
|
||||
// Check whether any operands are unresolved, requiring re-uniquing.
|
||||
unsigned NumUnresolved = countUnresolvedOperands();
|
||||
if (!NumUnresolved)
|
||||
return;
|
||||
|
||||
SubclassData32 = NumUnresolved;
|
||||
}
|
||||
|
||||
this->Context.makeReplaceable(make_unique<ReplaceableMetadataImpl>(Context));
|
||||
SubclassData32 = NumUnresolved;
|
||||
}
|
||||
|
||||
static bool isOperandUnresolved(Metadata *Op) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user