| Index: src/IceTargetLoweringX86Base.h
|
| diff --git a/src/IceTargetLoweringX86Base.h b/src/IceTargetLoweringX86Base.h
|
| index 48f04abbd6c65b7aacbb0f4511683e5301866a38..0c2523f9cb97940cbdd4e459b784455a53c6878d 100644
|
| --- a/src/IceTargetLoweringX86Base.h
|
| +++ b/src/IceTargetLoweringX86Base.h
|
| @@ -461,7 +461,7 @@ protected:
|
| X86OperandMem **findMemoryReference() { return nullptr; }
|
|
|
| public:
|
| - std::unique_ptr<AutoBundle> Bundler;
|
| + AutoBundle *Bundler = nullptr;
|
| X86OperandMem **const MemOperand;
|
|
|
| template <typename... T>
|
| @@ -471,13 +471,18 @@ protected:
|
| : findMemoryReference(Args...)) {
|
| if (MemOperand != nullptr) {
|
| if (Traits::Is64Bit) {
|
| - Bundler = makeUnique<AutoBundle>(Target, BundleLockOpt);
|
| + Bundler = new (Target->Func->template allocate<AutoBundle>())
|
| + AutoBundle(Target, BundleLockOpt);
|
| }
|
| *MemOperand = Target->_sandbox_mem_reference(*MemOperand);
|
| }
|
| }
|
|
|
| - ~AutoMemorySandboxer() {}
|
| + ~AutoMemorySandboxer() {
|
| + if (Bundler != nullptr) {
|
| + Bundler->~AutoBundle();
|
| + }
|
| + }
|
| };
|
|
|
| /// The following are helpers that insert lowered x86 instructions with
|
|
|