Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::repla…
Browse files Browse the repository at this point in the history
…ceAllUsesWith.

Fixes llgo following Duncan's changes to debug info in r231082. llgo needs
to replace composite types, which are no longer represented using MDTuple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231416 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
pcc committed Mar 5, 2015
1 parent 292f5ef commit bdfd937
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bindings/go/llvm/IRBindings.cpp
Expand Up @@ -86,9 +86,8 @@ void LLVMSetMetadata2(LLVMValueRef Inst, unsigned KindID, LLVMMetadataRef MD) {
}

void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
auto *Node = unwrap<MDTuple>(MD);
assert(Node->isTemporary() && "Expected temporary node");
Node->replaceAllUsesWith(unwrap<MDNode>(New));
auto *Node = unwrap<MDNode>(MD);
Node->replaceAllUsesWith(unwrap<Metadata>(New));
MDNode::deleteTemporary(Node);
}

Expand Down

0 comments on commit bdfd937

Please sign in to comment.