Skip to content

Commit

Permalink
Fix headers for LLVM 18.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Jun 19, 2024
1 parent dff6c92 commit 7705ffb
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/llvmheaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@

#include "llvm/IR/LegacyPassManager.h"

#if LLVM_VERSION < 170
#include "llvm/Support/Host.h"
#else
#include "llvm/TargetParser/Host.h"
#endif
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
Expand Down Expand Up @@ -62,11 +66,13 @@
#include "llvmheaders_160.h"
#elif LLVM_VERSION < 180
#include "llvmheaders_170.h"
#elif LLVM_VERSION < 190
#include "llvmheaders_180.h"
#else
#error "unsupported LLVM version"
// for OSX code completion
#define LLVM_VERSION 170
#include "llvmheaders_170.h"
#define LLVM_VERSION 180
#include "llvmheaders_180.h"
#endif

#define UNIQUEIFY(T, x) (std::unique_ptr<T>(x))
Expand Down
34 changes: 34 additions & 0 deletions src/llvmheaders_180.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Mangler.h"
//#include "llvm/ExecutionEngine/ObjectImage.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Linker/Linker.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"

#include "llvm/Support/VirtualFileSystem.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Rewrite/Frontend/Rewriters.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Object/SymbolSize.h"

#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Support/Error.h"

#define LLVM_PATH_TYPE std::string
#define RAW_FD_OSTREAM_NONE sys::fs::OF_None
#define RAW_FD_OSTREAM_BINARY sys::fs::OF_None

0 comments on commit 7705ffb

Please sign in to comment.