mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Fixes llgo following Duncan's changes to debug info in r231082. llgo needs to replace composite types, which are no longer represented using MDTuple. llvm-svn: 231416
This commit is contained in:
parent
442f27a805
commit
4f5a1f3321
@ -86,9 +86,8 @@ void LLVMSetMetadata2(LLVMValueRef Inst, unsigned KindID, LLVMMetadataRef MD) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
|
void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
|
||||||
auto *Node = unwrap<MDTuple>(MD);
|
auto *Node = unwrap<MDNode>(MD);
|
||||||
assert(Node->isTemporary() && "Expected temporary node");
|
Node->replaceAllUsesWith(unwrap<Metadata>(New));
|
||||||
Node->replaceAllUsesWith(unwrap<MDNode>(New));
|
|
||||||
MDNode::deleteTemporary(Node);
|
MDNode::deleteTemporary(Node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user