diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-11-25 02:26:22 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-11-25 02:26:22 +0000 |
commit | cb2818fa7630741e03beb352f1df773f238a40d8 (patch) | |
tree | d57be3581f7f1038b9d988b67d5d74d3e1ca841d /llvm/lib/IR/Constants.cpp | |
parent | 899b85a556e5493beea0ef0d914d5a454e6b1a81 (diff) | |
download | bcm5719-llvm-cb2818fa7630741e03beb352f1df773f238a40d8.tar.gz bcm5719-llvm-cb2818fa7630741e03beb352f1df773f238a40d8.zip |
Revert "unique_ptrify LLVMContextImpl::CAZConstants"
Missed the complexities of how these elements are destroyed.
This reverts commit r222714.
llvm-svn: 222715
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index bc51be6259b..e0cb835c2c6 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -1330,12 +1330,12 @@ bool ConstantFP::isValueValidForType(Type *Ty, const APFloat& Val) { ConstantAggregateZero *ConstantAggregateZero::get(Type *Ty) { assert((Ty->isStructTy() || Ty->isArrayTy() || Ty->isVectorTy()) && "Cannot create an aggregate zero of non-aggregate type!"); - - auto &Entry = Ty->getContext().pImpl->CAZConstants[Ty]; + + ConstantAggregateZero *&Entry = Ty->getContext().pImpl->CAZConstants[Ty]; if (!Entry) - Entry.reset(new ConstantAggregateZero(Ty)); + Entry = new ConstantAggregateZero(Ty); - return Entry.get(); + return Entry; } /// destroyConstant - Remove the constant from the constant table. |