mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Improve ExecutionEngine code formatting
This commit is contained in:
parent
de67937f2c
commit
3212b2b139
1 changed files with 4 additions and 4 deletions
|
|
@ -64,19 +64,19 @@ int ExecutionEngine::run(std::unique_ptr<llvm::Module> _module, u256& _gas, ExtV
|
|||
|
||||
auto triple = llvm::Triple(llvm::sys::getProcessTriple());
|
||||
if (triple.getOS() == llvm::Triple::OSType::Win32)
|
||||
triple.setObjectFormat(llvm::Triple::ObjectFormatType::ELF); // MCJIT does not support COFF format
|
||||
triple.setObjectFormat(llvm::Triple::ObjectFormatType::ELF); // MCJIT does not support COFF format
|
||||
module->setTargetTriple(triple.str());
|
||||
|
||||
auto exec = std::unique_ptr<llvm::ExecutionEngine>(builder.create());
|
||||
if (!exec)
|
||||
BOOST_THROW_EXCEPTION(Exception() << errinfo_comment(errorMsg));
|
||||
_module.release(); // Successfully created llvm::ExecutionEngine takes ownership of the module
|
||||
_module.release(); // Successfully created llvm::ExecutionEngine takes ownership of the module
|
||||
|
||||
auto finalizationStartTime = std::chrono::high_resolution_clock::now();
|
||||
exec->finalizeObject();
|
||||
auto finalizationEndTime = std::chrono::high_resolution_clock::now();
|
||||
clog(JIT) << "Module finalization time: "
|
||||
<< std::chrono::duration_cast<std::chrono::microseconds>(finalizationEndTime - finalizationStartTime).count();
|
||||
<< std::chrono::duration_cast<std::chrono::microseconds>(finalizationEndTime - finalizationStartTime).count();
|
||||
|
||||
// Create fake ExtVM interface
|
||||
if (!_ext)
|
||||
|
|
@ -117,7 +117,7 @@ int ExecutionEngine::run(std::unique_ptr<llvm::Module> _module, u256& _gas, ExtV
|
|||
|
||||
auto executionEndTime = std::chrono::high_resolution_clock::now();
|
||||
clog(JIT) << "Execution time : "
|
||||
<< std::chrono::duration_cast<std::chrono::microseconds>(executionEndTime - executionStartTime).count();
|
||||
<< std::chrono::duration_cast<std::chrono::microseconds>(executionEndTime - executionStartTime).count();
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue