summaryrefslogtreecommitdiff
path: root/bindings/go/llvm/IRBindings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/go/llvm/IRBindings.cpp')
-rw-r--r--bindings/go/llvm/IRBindings.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/bindings/go/llvm/IRBindings.cpp b/bindings/go/llvm/IRBindings.cpp
index fac4126acda34..fd0cb8006a4fe 100644
--- a/bindings/go/llvm/IRBindings.cpp
+++ b/bindings/go/llvm/IRBindings.cpp
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "IRBindings.h"
-
#include "llvm/IR/Attributes.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
@@ -66,8 +65,9 @@ LLVMMetadataRef LLVMMDNode2(LLVMContextRef C, LLVMMetadataRef *MDs,
LLVMMetadataRef LLVMTemporaryMDNode(LLVMContextRef C, LLVMMetadataRef *MDs,
unsigned Count) {
- return wrap(MDNode::getTemporary(*unwrap(C),
- ArrayRef<Metadata *>(unwrap(MDs), Count)));
+ return wrap(MDTuple::getTemporary(*unwrap(C),
+ ArrayRef<Metadata *>(unwrap(MDs), Count))
+ .release());
}
void LLVMAddNamedMetadataOperand2(LLVMModuleRef M, const char *name,
@@ -86,8 +86,8 @@ void LLVMSetMetadata2(LLVMValueRef Inst, unsigned KindID, LLVMMetadataRef MD) {
}
void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
- auto *Node = unwrap<MDNodeFwdDecl>(MD);
- Node->replaceAllUsesWith(unwrap<MDNode>(New));
+ auto *Node = unwrap<MDNode>(MD);
+ Node->replaceAllUsesWith(unwrap<Metadata>(New));
MDNode::deleteTemporary(Node);
}