mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-26 06:04:47 +00:00
[IR] Manage TheNoneToken with a std::unique_ptr
Hopefully, this will make the sanitizer build bots happy. llvm-svn: 253248
This commit is contained in:
parent
1bc0b4ec67
commit
8fe3484899
@ -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.
|
||||
|
@ -21,7 +21,6 @@ using namespace llvm;
|
||||
|
||||
LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
|
||||
: TheTrueVal(nullptr), TheFalseVal(nullptr),
|
||||
TheNoneToken(nullptr),
|
||||
VoidTy(C, Type::VoidTyID),
|
||||
LabelTy(C, Type::LabelTyID),
|
||||
HalfTy(C, Type::HalfTyID),
|
||||
|
@ -924,7 +924,7 @@ public:
|
||||
ConstantInt *TheTrueVal;
|
||||
ConstantInt *TheFalseVal;
|
||||
|
||||
ConstantTokenNone *TheNoneToken;
|
||||
std::unique_ptr<ConstantTokenNone> TheNoneToken;
|
||||
|
||||
// Basic type instances.
|
||||
Type VoidTy, LabelTy, HalfTy, FloatTy, DoubleTy, MetadataTy, TokenTy;
|
||||
|
Loading…
x
Reference in New Issue
Block a user