forked from OSchip/llvm-project
Don't leak TargetMachine in ExecutionEngine::setupTargetTriple
PiperOrigin-RevId: 268361054
This commit is contained in:
parent
ee8cbccacf
commit
d732aaf2cb
|
@ -119,8 +119,8 @@ bool ExecutionEngine::setupTargetTriple(Module *llvmModule) {
|
|||
errs() << "NO target: " << errorMessage << "\n";
|
||||
return true;
|
||||
}
|
||||
auto machine =
|
||||
target->createTargetMachine(targetTriple, "generic", "", {}, {});
|
||||
std::unique_ptr<llvm::TargetMachine> machine(
|
||||
target->createTargetMachine(targetTriple, "generic", "", {}, {}));
|
||||
llvmModule->setDataLayout(machine->createDataLayout());
|
||||
llvmModule->setTargetTriple(targetTriple);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue