From a599959a61e2a9ae313b851b2b63c0a2b97d3cb5 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Tue, 19 Dec 2023 18:53:31 +0100 Subject: llvm-orc-jit: migrate to llvm17 --- content/2022-07-07-llvm-orc-jit/ccompiler.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'content/2022-07-07-llvm-orc-jit/ccompiler.h') 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 #include -#include #include +#include 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 M; }; - Expected compile(const char *code) const { + Expected 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 DE; }; -} // namespace cc +} // namespace cc #endif -- cgit v1.2.3