diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiler_llvm/compilation_unit.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc index 4e2f16ff2c..e7f77e21ce 100644 --- a/src/compiler_llvm/compilation_unit.cc +++ b/src/compiler_llvm/compilation_unit.cc @@ -327,12 +327,12 @@ bool CompilationUnit::MaterializeToFile(int output_fd, target_options.EnableFastISel = true; // Create the llvm::TargetMachine - llvm::TargetMachine* target_machine = + llvm::OwningPtr<llvm::TargetMachine> target_machine( target->createTargetMachine(target_triple, "", target_attr, target_options, llvm::Reloc::Static, llvm::CodeModel::Small, - llvm::CodeGenOpt::Aggressive); + llvm::CodeGenOpt::Aggressive)); - CHECK(target_machine != NULL) << "Failed to create target machine"; + CHECK(target_machine.get() != NULL) << "Failed to create target machine"; // Add target data llvm::TargetData const* target_data = target_machine->getTargetData(); |