summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 21:30:18 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 21:30:18 +0000
commitf9eaea701dd2771fbd72145ed8eaaaeb62779b08 (patch)
treea62d58a3705c38c06d23fb7cbd115fda9ef3554c /bindings
parenta23cc6a1ea64d1eeaf61ca45881b61036f414913 (diff)
IR: Return unique_ptr from MDNode::getTemporary()
Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and clean up call sites. (For now, `DIBuilder` call sites just call `release()` immediately.) There's an accompanying change in each of clang and polly to use the new API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/go/llvm/IRBindings.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/bindings/go/llvm/IRBindings.cpp b/bindings/go/llvm/IRBindings.cpp
index 7c2fe60b2b9..402407eaf8d 100644
--- a/bindings/go/llvm/IRBindings.cpp
+++ b/bindings/go/llvm/IRBindings.cpp
@@ -66,8 +66,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,