IR: Return unique_ptr from MDNode::getTemporary()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 19 Jan 2015 21:30:18 +0000 (21:30 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 19 Jan 2015 21:30:18 +0000 (21:30 +0000)
commitf9eaea701dd2771fbd72145ed8eaaaeb62779b08
treea62d58a3705c38c06d23fb7cbd115fda9ef3554c
parenta23cc6a1ea64d1eeaf61ca45881b61036f414913
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
bindings/go/llvm/IRBindings.cpp
include/llvm/IR/Metadata.h
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/IR/DIBuilder.cpp
lib/IR/MDBuilder.cpp
lib/Transforms/Utils/InlineFunction.cpp
lib/Transforms/Utils/ValueMapper.cpp
unittests/IR/MetadataTest.cpp