mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-15 08:19:51 +00:00
Avoid adding a null MD node operand, which crashes with "-debug" when trying
to print the operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5098da0a7e
commit
cc7354e993
@ -769,7 +769,8 @@ EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
|
||||
// Get the mdnode from the asm if it exists and add it to the instruction.
|
||||
SDValue MDV = Node->getOperand(InlineAsm::Op_MDNode);
|
||||
const MDNode *MD = cast<MDNodeSDNode>(MDV)->getMD();
|
||||
MI->addOperand(MachineOperand::CreateMetadata(MD));
|
||||
if (MD)
|
||||
MI->addOperand(MachineOperand::CreateMetadata(MD));
|
||||
|
||||
MBB->insert(InsertPos, MI);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user