summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ad3f32e)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245671
91177308-0d34-0410-b5e6-
96231b3b80d8
std::unique_ptr<LLVMContext> OwnedContext;
LLVMContext &Context;
Linker IRLinker;
std::unique_ptr<LLVMContext> OwnedContext;
LLVMContext &Context;
Linker IRLinker;
- TargetMachine *TargetMach = nullptr;
+ std::unique_ptr<TargetMachine> TargetMach;
bool EmitDwarfDebugInfo = false;
bool ScopeRestrictionsDone = false;
lto_codegen_model CodeModel = LTO_CODEGEN_PIC_MODEL_DEFAULT;
bool EmitDwarfDebugInfo = false;
bool ScopeRestrictionsDone = false;
lto_codegen_model CodeModel = LTO_CODEGEN_PIC_MODEL_DEFAULT;
LTOCodeGenerator::~LTOCodeGenerator() {
destroyMergedModule();
LTOCodeGenerator::~LTOCodeGenerator() {
destroyMergedModule();
-
- delete TargetMach;
- TargetMach = nullptr;
}
// Initialize LTO passes. Please keep this funciton in sync with
}
// Initialize LTO passes. Please keep this funciton in sync with
- TargetMach = march->createTargetMachine(TripleStr, MCpu, FeatureStr, Options,
- RelocModel, CodeModel::Default,
- CGOptLevel);
+ TargetMach.reset(march->createTargetMachine(TripleStr, MCpu, FeatureStr,
+ Options, RelocModel,
+ CodeModel::Default, CGOptLevel));