Skip to content

Commit

Permalink
Fix LLVM 18 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Jun 19, 2024
1 parent 0321fba commit ca711ab
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/tllvmutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,19 @@ bool llvmutil_emitobjfile(Module *Mod, TargetMachine *TM, bool outputobjectfile,
Mod->setDataLayout(TM->createDataLayout());
#endif

CodeGenFileType ft = outputobjectfile ? CGFT_ObjectFile : CGFT_AssemblyFile;
CodeGenFileType ft = outputobjectfile ?
#if LLVM_VERSION < 180
CGFT_ObjectFile
#else
CodeGenFileType::ObjectFile
#endif
:
#if LLVM_VERSION < 180
CGFT_AssemblyFile
#else
CodeGenFileType::AssemblyFile
#endif
;

emitobjfile_t &destf = dest;

Expand Down

0 comments on commit ca711ab

Please sign in to comment.