Skip to content
Browse files

Follow "The Great Renaming" in LLVM 3.3

This time VMCore was renamed to IR. Several top level include
files were moved to new subfolder IR.
  • Loading branch information...
1 parent 1caf4c9 commit 272e7b7a556027f6e5407b950823a8e533fd238d @redstar redstar committed Jan 3, 2013
View
7 CMakeLists.txt
@@ -334,11 +334,12 @@ get_target_property(LDC_LOC ${LDC_EXE} LOCATION)
#
# The LLVM_INCLUDE_DIR definition is not always set, e.g. on Windows.
-find_path(LLVM_INTRINSIC_TD_PATH "llvm/Intrinsics.td" PATHS ${LLVM_INCLUDE_DIRS} NO_DEFAULT_PATH)
+find_path(LLVM_INTRINSIC_TD_PATH "Intrinsics.td" PATHS ${LLVM_INCLUDE_DIRS}/llvm ${LLVM_INCLUDE_DIRS}/llvm/IR NO_DEFAULT_PATH)
if (${LLVM_INTRINSIC_TD_PATH} STREQUAL "LLVM_INTRINSIC_TD_PATH-NOTFOUND")
- message(SEND_ERROR "File llvm/Intrinsics.td not found")
+ message(SEND_ERROR "File Intrinsics.td not found")
else()
- message(STATUS "Using path for llvm/Intrinsics.td: ${LLVM_INTRINSIC_TD_PATH}")
+ string(REGEX REPLACE "/llvm(/IR)?$" "" LLVM_INTRINSIC_TD_PATH ${LLVM_INTRINSIC_TD_PATH})
+ message(STATUS "Using path for Intrinsics.td: ${LLVM_INTRINSIC_TD_PATH}")
endif()
add_definitions(-DLLVM_INTRINSIC_TD_PATH="${LLVM_INTRINSIC_TD_PATH}")
View
4 driver/toobj.cpp
@@ -12,7 +12,11 @@
#include "llvm/Analysis/Verifier.h"
#include "llvm/Bitcode/ReaderWriter.h"
+#if LDC_LLVM_VER >= 303
+#include "llvm/IR/Module.h"
+#else
#include "llvm/Module.h"
+#endif
#include "llvm/PassManager.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/CommandLine.h"
View
13 gen/llvm.h
@@ -18,6 +18,18 @@
#ifndef GEN_LLVM_H
#define GEN_LLVM_H
+#if LDC_LLVM_VER >= 303
+#include "llvm/IR/Type.h"
+#include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/Constants.h"
+#include "llvm/IR/IntrinsicInst.h"
+#include "llvm/IR/CallingConv.h"
+#include "llvm/IR/GlobalVariable.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/Module.h"
+#include "llvm/IR/Value.h"
+#include "llvm/IR/Attributes.h"
+#else
#include "llvm/Type.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Constants.h"
@@ -28,6 +40,7 @@
#include "llvm/Module.h"
#include "llvm/Value.h"
#include "llvm/Attributes.h"
+#endif
#if LDC_LLVM_VER >= 302
#include "llvm/DataLayout.h"
View
4 gen/optimizer.cpp
@@ -15,7 +15,11 @@
#include "llvm/PassManager.h"
#include "llvm/LinkAllPasses.h"
+#if LDC_LLVM_VER >= 303
+#include "llvm/IR/Module.h"
+#else
#include "llvm/Module.h"
+#endif
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/Verifier.h"
#if LDC_LLVM_VER >= 302
View
13 gen/passes/GarbageCollect2Stack.cpp
@@ -22,16 +22,23 @@
#include "Passes.h"
#include "llvm/Pass.h"
+#if LDC_LLVM_VER >= 303
+#include "llvm/IR/Module.h"
+#include "llvm/IR/Constants.h"
+#include "llvm/IR/Intrinsics.h"
+#include "llvm/IR/IRBuilder.h"
+#else
#include "llvm/Module.h"
#include "llvm/Constants.h"
#include "llvm/Intrinsics.h"
-#include "llvm/Support/CallSite.h"
-#include "llvm/Support/CommandLine.h"
-#if LDC_LLVM_VER >= 302
+#if LDC_LLVM_VER == 302
#include "llvm/IRBuilder.h"
#else
#include "llvm/Support/IRBuilder.h"
#endif
+#endif
+#include "llvm/Support/CallSite.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/ValueTracking.h"
View
10 gen/passes/SimplifyDRuntimeCalls.cpp
@@ -18,14 +18,20 @@
#include "Passes.h"
-#include "llvm/Function.h"
#include "llvm/Pass.h"
+#if LDC_LLVM_VER >= 303
+#include "llvm/IR/Function.h"
+#include "llvm/IR/Intrinsics.h"
+#include "llvm/IR/IRBuilder.h"
+#else
+#include "llvm/Function.h"
#include "llvm/Intrinsics.h"
-#if LDC_LLVM_VER >= 302
+#if LDC_LLVM_VER == 302
#include "llvm/IRBuilder.h"
#else
#include "llvm/Support/IRBuilder.h"
#endif
+#endif
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#if LDC_LLVM_VER >= 302
View
4 ir/irfuncty.h
@@ -18,7 +18,11 @@
#include "ir/ir.h"
#include "llvm/ADT/SmallVector.h"
+#if LDC_LLVM_VER >= 303
+#include "llvm/IR/Attributes.h"
+#else
#include "llvm/Attributes.h"
+#endif
#include <vector>
View
3 utils/gen_gccbuiltins.cpp
@@ -175,6 +175,9 @@ int main(int argc, char** argv)
sys::Path file(LLVM_INTRINSIC_TD_PATH);
file.appendComponent("llvm");
+#if LDC_LLVM_VER >= 303
+ file.appendComponent("IR");
+#endif
file.appendComponent("Intrinsics.td");
string iStr = string("-I=") + string(LLVM_INTRINSIC_TD_PATH);

0 comments on commit 272e7b7

Please sign in to comment.
Something went wrong with that request. Please try again.