diff options
Diffstat (limited to 'bindings/go/llvm/IRBindings.cpp')
-rw-r--r-- | bindings/go/llvm/IRBindings.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bindings/go/llvm/IRBindings.cpp b/bindings/go/llvm/IRBindings.cpp index fb451ef..fd0cb80 100644 --- a/bindings/go/llvm/IRBindings.cpp +++ b/bindings/go/llvm/IRBindings.cpp @@ -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); } |