Skip to content

Commit

Permalink
stricter includes
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Nov 9, 2023
1 parent 2427d2c commit 3df8dee
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/llvm/ext/llvm_ext.cc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include <llvm/IR/DIBuilder.h>
#include <llvm/Config/llvm-config.h>

#define LLVM_VERSION_GE(major, minor) \
(LLVM_VERSION_MAJOR > (major) || LLVM_VERSION_MAJOR == (major) && LLVM_VERSION_MINOR >= (minor))

#include <llvm/IR/IRBuilder.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/ExecutionEngine/RTDyldMemoryManager.h>

using namespace llvm;

#define LLVM_VERSION_GE(major, minor) \
(LLVM_VERSION_MAJOR > (major) || LLVM_VERSION_MAJOR == (major) && LLVM_VERSION_MINOR >= (minor))

#include <llvm/Target/CodeGenCWrappers.h>

#if LLVM_VERSION_GE(16, 0)
Expand All @@ -18,6 +19,8 @@ extern "C" {

#if LLVM_VERSION_GE(9, 0)
#else
#include <llvm/IR/DIBuilder.h>

LLVMMetadataRef LLVMExtDIBuilderCreateEnumerator(
LLVMDIBuilderRef Dref, const char *Name, int64_t Value) {
DIEnumerator *e = unwrap(Dref)->createEnumerator(Name, Value);
Expand Down

0 comments on commit 3df8dee

Please sign in to comment.