support LLVM trunk

This commit is contained in:
Ilia Filippov
2014-03-07 16:28:56 +04:00
parent 6738af0a0c
commit 47f7900cd3
7 changed files with 23 additions and 13 deletions

View File

@@ -66,7 +66,11 @@
#include <llvm/IR/Intrinsics.h>
#include <llvm/IR/DerivedTypes.h>
#endif
#include <llvm/Linker.h>
#if defined(LLVM_3_5)
#include <llvm/Linker/Linker.h>
#else
#include <llvm/Linker.h>
#endif
#include <llvm/Target/TargetMachine.h>
#include <llvm/ADT/Triple.h>
#include <llvm/Support/MemoryBuffer.h>

View File

@@ -97,8 +97,10 @@
#include "llvm/Support/FormattedStream.h"
#if defined(LLVM_3_1) || defined(LLVM_3_2)
#include "llvm/Support/InstVisitor.h"
#else // LLVM 3.3+
#elif defined (LLVM_3_3) || defined (LLVM_3_4)
#include "llvm/InstVisitor.h"
#else // LLVM 3.5+
#include "llvm/IR/InstVisitor.h"
#endif
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/TargetRegistry.h"

6
ctx.h
View File

@@ -47,9 +47,9 @@
#include <llvm/IR/InstrTypes.h>
#include <llvm/IR/Instructions.h>
#endif
#if defined(LLVM_3_1)
#include <llvm/Analysis/DebugInfo.h>
#include <llvm/Analysis/DIBuilder.h>
#if defined(LLVM_3_5)
#include <llvm/IR/DebugInfo.h>
#include <llvm/IR/DIBuilder.h>
#else
#include <llvm/DebugInfo.h>
#include <llvm/DIBuilder.h>

View File

@@ -57,9 +57,9 @@
#include <llvm/IR/Module.h>
#include <llvm/IR/Instructions.h>
#endif
#if defined(LLVM_3_1)
#include <llvm/Analysis/DebugInfo.h>
#include <llvm/Analysis/DIBuilder.h>
#if defined(LLVM_3_5)
#include <llvm/IR/DebugInfo.h>
#include <llvm/IR/DIBuilder.h>
#else
#include <llvm/DebugInfo.h>
#include <llvm/DIBuilder.h>

View File

@@ -41,9 +41,12 @@
#include "ispc.h"
#include "ast.h"
#if !defined(LLVM_3_1) && !defined(LLVM_3_2) && !defined(LLVM_3_3)
#if defined(LLVM_3_4)
#include <llvm/DebugInfo.h>
#endif
#if defined(LLVM_3_5)
#include <llvm/IR/DebugInfo.h>
#endif
namespace llvm
{

View File

@@ -72,10 +72,12 @@
#include <llvm/IR/Verifier.h>
#include <llvm/IR/IRPrintingPasses.h>
#include <llvm/IR/PatternMatch.h>
#include <llvm/IR/DebugInfo.h>
#else
#include <llvm/Analysis/Verifier.h>
#include <llvm/Assembly/PrintModulePass.h>
#include <llvm/Support/PatternMatch.h>
#include <llvm/DebugInfo.h>
#endif
#include <llvm/Analysis/ConstantFolding.h>
#include <llvm/Target/TargetLibraryInfo.h>
@@ -94,7 +96,6 @@
#include <llvm/Target/TargetMachine.h>
#include <llvm/Analysis/Passes.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/DebugInfo.h>
#include <llvm/Support/Dwarf.h>
#ifdef ISPC_IS_LINUX
#include <alloca.h>

View File

@@ -50,9 +50,9 @@
#include <llvm/IR/Value.h>
#include <llvm/IR/Module.h>
#endif
#if defined(LLVM_3_1)
#include <llvm/Analysis/DebugInfo.h>
#include <llvm/Analysis/DIBuilder.h>
#if defined(LLVM_3_5)
#include <llvm/IR/DebugInfo.h>
#include <llvm/IR/DIBuilder.h>
#else
#include <llvm/DebugInfo.h>
#include <llvm/DIBuilder.h>