diff options
Diffstat (limited to 'content/2022-07-07-llvm-orc-jit/ccompiler.h')
-rw-r--r-- | content/2022-07-07-llvm-orc-jit/ccompiler.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/content/2022-07-07-llvm-orc-jit/ccompiler.h b/content/2022-07-07-llvm-orc-jit/ccompiler.h index 57a2b62..368fc21 100644 --- a/content/2022-07-07-llvm-orc-jit/ccompiler.h +++ b/content/2022-07-07-llvm-orc-jit/ccompiler.h @@ -8,8 +8,8 @@ #include <clang/Lex/PreprocessorOptions.h> #include <llvm/IR/Module.h> -#include <llvm/Support/Host.h> #include <llvm/Support/TargetSelect.h> +#include <llvm/TargetParser/Host.h> namespace cc { @@ -21,7 +21,6 @@ using clang::DiagnosticsEngine; using clang::EmitLLVMOnlyAction; using clang::TextDiagnosticPrinter; -using llvm::cantFail; using llvm::Expected; using llvm::IntrusiveRefCntPtr; using llvm::LLVMContext; @@ -51,7 +50,7 @@ public: std::unique_ptr<Module> M; }; - Expected<CompileResult> compile(const char *code) const { + Expected<CompileResult> compile(const char* code) const { using std::errc; const auto err = [](errc ec) { return std::make_error_code(ec); }; @@ -77,7 +76,7 @@ public: code_fname, MemoryBuffer::getMemBuffer(code).release()); // Configure codegen options. - auto &CG = CC.getCodeGenOpts(); + auto& CG = CC.getCodeGenOpts(); CG.OptimizationLevel = 3; CG.setInlining(clang::CodeGenOptions::NormalInlining); @@ -104,6 +103,6 @@ private: std::unique_ptr<DiagnosticsEngine> DE; }; -} // namespace cc +} // namespace cc #endif |