summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-11-16 20:55:57 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-11-16 20:55:57 +0000
commit2dd41c5d42d1f34aae67b0d883afc7b1200a4070 (patch)
treed1e69ff97b14b5f9c8d3e0aed565a9a3bbac31af /llvm/lib/IR/Constants.cpp
parent9c432ae111bedfbd7987bfd6824d205cca3dc3e8 (diff)
downloadbcm5719-llvm-2dd41c5d42d1f34aae67b0d883afc7b1200a4070.tar.gz
bcm5719-llvm-2dd41c5d42d1f34aae67b0d883afc7b1200a4070.zip
[IR] Manage TheNoneToken with a std::unique_ptr
Hopefully, this will make the sanitizer build bots happy. llvm-svn: 253248
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index bcca8a2047f..457b69d2f39 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -1161,8 +1161,8 @@ Constant *ConstantVector::getSplat(unsigned NumElts, Constant *V) {
ConstantTokenNone *ConstantTokenNone::get(LLVMContext &Context) {
LLVMContextImpl *pImpl = Context.pImpl;
if (!pImpl->TheNoneToken)
- pImpl->TheNoneToken = new ConstantTokenNone(Context);
- return pImpl->TheNoneToken;
+ pImpl->TheNoneToken.reset(new ConstantTokenNone(Context));
+ return pImpl->TheNoneToken.get();
}
/// Remove the constant from the constant table.
OpenPOWER on IntegriCloud