diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 21:30:18 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 21:30:18 +0000 |
commit | 7d82313bcd972be7a125dd9448a807eb100a520d (patch) | |
tree | 8963ef3187d3133f675a578956bb6ed8ea19b2bb /llvm/bindings/go | |
parent | 2658554aeca02328bcd0ee9ca80d902e0a107563 (diff) | |
download | bcm5719-llvm-7d82313bcd972be7a125dd9448a807eb100a520d.tar.gz bcm5719-llvm-7d82313bcd972be7a125dd9448a807eb100a520d.zip |
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.
llvm-svn: 226504
Diffstat (limited to 'llvm/bindings/go')
-rw-r--r-- | llvm/bindings/go/llvm/IRBindings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/bindings/go/llvm/IRBindings.cpp b/llvm/bindings/go/llvm/IRBindings.cpp index 7c2fe60b2b9..402407eaf8d 100644 --- a/llvm/bindings/go/llvm/IRBindings.cpp +++ b/llvm/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, |