[OpenGTL] llvm 3.3 patch

Adam Jackson ajax at fedoraproject.org
Mon May 6 13:52:38 UTC 2013


commit 52c1211770b93b4ea772153bc67f1e09949cb341
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 6 09:52:34 2013 -0400

    llvm 3.3 patch

 OpenGTL.spec                     |    5 +-
 opengtl-0.9.18-llvm-3.3svn.patch |  761 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 765 insertions(+), 1 deletions(-)
---
diff --git a/OpenGTL.spec b/OpenGTL.spec
index 190a1aa..0ffb4a0 100644
--- a/OpenGTL.spec
+++ b/OpenGTL.spec
@@ -5,7 +5,7 @@
 Name: OpenGTL
 Summary: Graphics Transformation Languages
 Version: 0.9.18
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 License: LGPLv2
 URL: http://opengtl.org/
@@ -17,6 +17,8 @@ Source1: http://download.opengtl.org/tests-data-%{version}.tar.bz2
 ## upstreamable patches
 # link llvm libs only private/static
 Patch50: OpenGTL-0.9.18-pkgconfig_llvm_libs_private.patch
+# allow linking against llvm 3.3svn
+Patch51: opengtl-0.9.18-llvm-3.3svn.patch
 
 ## upstream patches
 
@@ -56,6 +58,7 @@ native programs that use the OpenGTL libraries.
 %setup -q %{?test_data: -a 1}
 
 %patch50 -p1 -b .pkgconfig_llvm_libs_private
+%patch51 -p1 -b .jx
 
 
 %build
diff --git a/opengtl-0.9.18-llvm-3.3svn.patch b/opengtl-0.9.18-llvm-3.3svn.patch
new file mode 100644
index 0000000..eb53c44
--- /dev/null
+++ b/opengtl-0.9.18-llvm-3.3svn.patch
@@ -0,0 +1,761 @@
+commit 56502f218c2dcf052a2f5c97a5ab261047eec7d1
+Author: Adam Jackson <ajax at redhat.com>
+Date:   Thu May 2 13:09:15 2013 -0400
+
+    Build compat for LLVM 3.3
+    
+    Signed-off-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 99c9002..cdab3f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -78,8 +78,8 @@ else(MSVC)
+   FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} "native bitwriter linker bitreader jit interpreter support ipo" LLVM_LIBS LLVM_NATIVE_OBJECTS )
+ endif(MSVC)
+ 
+-if( NOT MSVC AND NOT (LLVM_VERSION STREQUAL "3.1" OR LLVM_VERSION STREQUAL "3.0" OR LLVM_VERSION STREQUAL "3.2svn"  OR LLVM_VERSION STREQUAL "3.2" ) ) # There is no way with MSVC to know the llvm version
+-  message(FATAL_ERROR "LLVM 3.0 or 3.1 or 3.2 is required.")
++if( NOT MSVC AND NOT (LLVM_VERSION STREQUAL "3.3svn" OR LLVM_VERSION STREQUAL "3.3" ) ) # There is no way with MSVC to know the llvm version
++  message(FATAL_ERROR "LLVM 3.3 is required.")
+ endif()
+ 
+ if(MSVC)
+diff --git a/OpenCTL/OpenCTL/Module.cpp b/OpenCTL/OpenCTL/Module.cpp
+index 6d40bad..0a741be 100644
+--- a/OpenCTL/OpenCTL/Module.cpp
++++ b/OpenCTL/OpenCTL/Module.cpp
+@@ -38,7 +38,7 @@
+ using namespace OpenCTL;
+ 
+ // LLVM
+-#include <llvm/Module.h>
++#include <llvm/IR/Module.h>
+ #include <llvm/Bitcode/ReaderWriter.h>
+ #ifdef LLVM_27_OR_28
+ #include <llvm/System/Path.h>
+@@ -47,8 +47,7 @@ using namespace OpenCTL;
+ #include <llvm/Support/Path.h>
+ #include <llvm/Support/DynamicLibrary.h>
+ #endif
+-#include <llvm/Module.h>
+-#include <llvm/LLVMContext.h>
++#include <llvm/IR/LLVMContext.h>
+ 
+ struct Module::Private {
+   Private() : moduleData(0), isStandardLibrary(false) {}
+diff --git a/OpenCTL/OpenCTL/Program.cpp b/OpenCTL/OpenCTL/Program.cpp
+index ed7b39d..4edee06 100644
+--- a/OpenCTL/OpenCTL/Program.cpp
++++ b/OpenCTL/OpenCTL/Program.cpp
+@@ -20,16 +20,16 @@
+ #include "Program.h"
+ 
+ // LLVM
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Instructions.h>
+-#include <llvm/Module.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Module.h>
+ #include <llvm/Transforms/Utils/Cloning.h>
+ 
+ // Passes
+ #include <llvm/PassManager.h>
+ #include <llvm/Analysis/LoopPass.h>
+ #include <llvm/Analysis/Verifier.h>
+-#include <llvm/GlobalVariable.h>
++#include <llvm/IR/GlobalVariable.h>
+ 
+ // GTLCore
+ #include "GTLCore/Buffer.h"
+diff --git a/OpenCTL/OpenCTL/compiler/Compiler.cpp b/OpenCTL/OpenCTL/compiler/Compiler.cpp
+index c08bd5d..3d36b91 100644
+--- a/OpenCTL/OpenCTL/compiler/Compiler.cpp
++++ b/OpenCTL/OpenCTL/compiler/Compiler.cpp
+@@ -27,10 +27,10 @@
+ #include <climits>
+ 
+ // LLVM
+-#include <llvm/InstrTypes.h>
++#include <llvm/IR/InstrTypes.h>
+ // #include <llvm/Linker.h>
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Module.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Module.h>
+ // #include <llvm/Transforms/Utils/Cloning.h>
+ // Library Loader
+ #ifdef LLVM_27_OR_28
+@@ -214,7 +214,7 @@ bool Compiler::compile(bool _isStandardLibrary, const GTLCore::String& sourceCod
+   return success;
+ }
+ 
+-#include <llvm/ValueSymbolTable.h>
++#include <llvm/IR/ValueSymbolTable.h>
+ 
+ bool Compiler::importModule(const GTLCore::String& name)
+ {
+diff --git a/OpenCTL/OpenCTL/compiler/ParserNG.cpp b/OpenCTL/OpenCTL/compiler/ParserNG.cpp
+index 6ce0983..c0108d0 100644
+--- a/OpenCTL/OpenCTL/compiler/ParserNG.cpp
++++ b/OpenCTL/OpenCTL/compiler/ParserNG.cpp
+@@ -19,9 +19,9 @@
+ 
+ #include "ParserNG.h"
+ 
+-#include <llvm/Constants.h>
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Type.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Type.h>
+ 
+ #include <GTLCore/LLVMBackend/CodeGenerator_p.h>
+ #include <GTLCore/CompilationMessage.h>
+diff --git a/OpenGTL/GTLCore/AST/AccessorExpression.cpp b/OpenGTL/GTLCore/AST/AccessorExpression.cpp
+index 60a97c5..14831f8 100644
+--- a/OpenGTL/GTLCore/AST/AccessorExpression.cpp
++++ b/OpenGTL/GTLCore/AST/AccessorExpression.cpp
+@@ -20,9 +20,9 @@
+ #include "AccessorExpression.h"
+ 
+ #include <llvm/ADT/ArrayRef.h>
+-#include <llvm/Constants.h>
+-#include <llvm/Function.h>
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Instructions.h>
+ 
+ #include "../LLVMBackend/CodeGenerator_p.h"
+ #include "../LLVMBackend/ExpressionResult_p.h"
+diff --git a/OpenGTL/GTLCore/AST/BinaryExpression.cpp b/OpenGTL/GTLCore/AST/BinaryExpression.cpp
+index c269efa..a6554db 100644
+--- a/OpenGTL/GTLCore/AST/BinaryExpression.cpp
++++ b/OpenGTL/GTLCore/AST/BinaryExpression.cpp
+@@ -19,7 +19,7 @@
+ 
+ #include "BinaryExpression.h"
+ 
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Instructions.h>
+ 
+ #include <GTLCore/Debug.h>
+ #include <GTLCore/LLVMBackend/CodeGenerator_p.h>
+diff --git a/OpenGTL/GTLCore/AST/CompoundExpression.cpp b/OpenGTL/GTLCore/AST/CompoundExpression.cpp
+index a50f1ae..2247cb0 100644
+--- a/OpenGTL/GTLCore/AST/CompoundExpression.cpp
++++ b/OpenGTL/GTLCore/AST/CompoundExpression.cpp
+@@ -19,10 +19,10 @@
+ 
+ #include "CompoundExpression.h"
+ 
+-#include <llvm/Constants.h>
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/GlobalVariable.h>
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/GlobalVariable.h>
++#include <llvm/IR/Instructions.h>
+ 
+ #include "../LLVMBackend/CodeGenerator_p.h"
+ #include "../Debug.h"
+diff --git a/OpenGTL/GTLCore/AST/ConstantCompoundExpression.cpp b/OpenGTL/GTLCore/AST/ConstantCompoundExpression.cpp
+index 1bb470c..a037c62 100644
+--- a/OpenGTL/GTLCore/AST/ConstantCompoundExpression.cpp
++++ b/OpenGTL/GTLCore/AST/ConstantCompoundExpression.cpp
+@@ -19,10 +19,10 @@
+ 
+ #include "ConstantCompoundExpression.h"
+ 
+-#include <llvm/Constants.h>
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/GlobalVariable.h>
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/GlobalVariable.h>
++#include <llvm/IR/Instructions.h>
+ 
+ #include "../LLVMBackend/CodeGenerator_p.h"
+ #include "../Debug.h"
+diff --git a/OpenGTL/GTLCore/AST/Expression.cpp b/OpenGTL/GTLCore/AST/Expression.cpp
+index a36ca49..54afe9f 100644
+--- a/OpenGTL/GTLCore/AST/Expression.cpp
++++ b/OpenGTL/GTLCore/AST/Expression.cpp
+@@ -19,11 +19,11 @@
+ 
+ #include "Expression.h"
+ 
+-#include <llvm/Constant.h>
+-#include <llvm/Constants.h>
+-#include <llvm/Function.h>
+-#include <llvm/GlobalVariable.h>
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Constant.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/GlobalVariable.h>
++#include <llvm/IR/Instructions.h>
+ 
+ #include "GTLCore/LLVMBackend/CodeGenerator_p.h"
+ #include "GTLCore/LLVMBackend/ExpressionResult_p.h"
+diff --git a/OpenGTL/GTLCore/AST/FunctionDeclaration.cpp b/OpenGTL/GTLCore/AST/FunctionDeclaration.cpp
+index 14934e7..9c40c8b 100644
+--- a/OpenGTL/GTLCore/AST/FunctionDeclaration.cpp
++++ b/OpenGTL/GTLCore/AST/FunctionDeclaration.cpp
+@@ -19,10 +19,10 @@
+ 
+ #include "FunctionDeclaration.h"
+ 
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Function.h>
+-#include <llvm/Instructions.h>
+-#include <llvm/Type.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Type.h>
+ 
+ #include <GTLCore/LLVMBackend/CodeGenerator_p.h>
+ #include <GTLCore/LLVMBackend/ExpressionResult_p.h>
+diff --git a/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp b/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp
+index 2a600f8..df7ea72 100644
+--- a/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp
++++ b/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp
+@@ -21,8 +21,8 @@
+ 
+ #include <stdlib.h>
+ 
+-#include <llvm/Constant.h>
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Constant.h>
++#include <llvm/IR/Instructions.h>
+ 
+ #include "../Type.h"
+ #include "../LLVMBackend/CodeGenerator_p.h"
+diff --git a/OpenGTL/GTLCore/AST/Statement.cpp b/OpenGTL/GTLCore/AST/Statement.cpp
+index 1aac59c..4a31065 100644
+--- a/OpenGTL/GTLCore/AST/Statement.cpp
++++ b/OpenGTL/GTLCore/AST/Statement.cpp
+@@ -21,12 +21,12 @@
+ 
+ // LLVM
+ #include <llvm/ADT/ArrayRef.h>
+-#include <llvm/BasicBlock.h>
+-#include <llvm/Constants.h>
+-#include <llvm/Function.h>
+-#include <llvm/GlobalVariable.h>
+-#include <llvm/Instructions.h>
+-#include <llvm/Module.h>
++#include <llvm/IR/BasicBlock.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/GlobalVariable.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Module.h>
+ 
+ // GTLCore
+ #include <GTLCore/LLVMBackend/CodeGenerator_p.h>
+diff --git a/OpenGTL/GTLCore/AST/Tree.cpp b/OpenGTL/GTLCore/AST/Tree.cpp
+index 4cb37a3..7c31c55 100644
+--- a/OpenGTL/GTLCore/AST/Tree.cpp
++++ b/OpenGTL/GTLCore/AST/Tree.cpp
+@@ -19,9 +19,9 @@
+ 
+ #include "Tree.h"
+ 
+-#include <llvm/Constant.h>
+-#include <llvm/GlobalVariable.h>
+-#include <llvm/Type.h>
++#include <llvm/IR/Constant.h>
++#include <llvm/IR/GlobalVariable.h>
++#include <llvm/IR/Type.h>
+ 
+ #include "FunctionDeclaration.h"
+ 
+@@ -37,8 +37,8 @@
+ #include "GTLCore/LLVMBackend/Visitor_p.h"
+ 
+ #include "Expression.h"
+-#include <llvm/Module.h>
+-#include <llvm/DerivedTypes.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/DerivedTypes.h>
+ 
+ using namespace GTLCore::AST;
+ 
+diff --git a/OpenGTL/GTLCore/Debug.cpp b/OpenGTL/GTLCore/Debug.cpp
+index ec51640..7b1754c 100644
+--- a/OpenGTL/GTLCore/Debug.cpp
++++ b/OpenGTL/GTLCore/Debug.cpp
+@@ -22,9 +22,9 @@
+ #include <map>
+ #include <fstream>
+ 
+-#include <llvm/Module.h>
+-#include <llvm/Value.h>
+-#include <llvm/Type.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/Value.h>
++#include <llvm/IR/Type.h>
+ #include <llvm/Support/Path.h>
+ #include <llvm/Support/raw_ostream.h>
+ 
+@@ -418,9 +418,9 @@ namespace GTLCore {
+ 
+ #ifdef OPENGTL_ENABLE_DEBUG_OUTPUT
+ 
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Function.h>
+-#include <llvm/Type.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Type.h>
+ 
+ void compareFunctionParameters( llvm::Value* func, const std::vector<llvm::Value*>& params  )
+ {
+diff --git a/OpenGTL/GTLCore/FunctionCaller_p.cpp b/OpenGTL/GTLCore/FunctionCaller_p.cpp
+index 6f4a957..628b302 100644
+--- a/OpenGTL/GTLCore/FunctionCaller_p.cpp
++++ b/OpenGTL/GTLCore/FunctionCaller_p.cpp
+@@ -21,9 +21,9 @@
+ 
+ #include <llvm/ExecutionEngine/GenericValue.h>
+ #include <llvm/ExecutionEngine/ExecutionEngine.h>
+-#include <llvm/Function.h>
+-
+-#include <llvm/DerivedTypes.h> // <- I don't understand why I need to include that file to be able to display llvm::Type on the standard output
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/DerivedTypes.h> // <- I don't understand why I need to include that file to be able to display llvm::Type on the standard output
+ 
+ #include "VirtualMachine_p.h"
+ 
+@@ -35,7 +35,6 @@
+ #include "LLVMBackend/GenerationContext_p.h"
+ #include "ModuleData_p.h"
+ #include "LLVMBackend/CodeGenerator_p.h"
+-#include <llvm/Instructions.h>
+ #include "Type_p.h"
+ #include <GTLCore/Parameter.h>
+ #include "PrimitiveTypesTraits_p.h"
+diff --git a/OpenGTL/GTLCore/Function_p.cpp b/OpenGTL/GTLCore/Function_p.cpp
+index 8bf93fb..c96b55c 100644
+--- a/OpenGTL/GTLCore/Function_p.cpp
++++ b/OpenGTL/GTLCore/Function_p.cpp
+@@ -21,9 +21,9 @@
+ 
+ #include <cstdarg>
+ 
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Module.h>
+-#include <llvm/Type.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/Type.h>
+ 
+ #include "Parameter.h"
+ 
+diff --git a/OpenGTL/GTLCore/LLVMBackend/CodeGenerator_p.cpp b/OpenGTL/GTLCore/LLVMBackend/CodeGenerator_p.cpp
+index da3013a..43c65b1 100644
+--- a/OpenGTL/GTLCore/LLVMBackend/CodeGenerator_p.cpp
++++ b/OpenGTL/GTLCore/LLVMBackend/CodeGenerator_p.cpp
+@@ -19,12 +19,12 @@
+ 
+ #include "CodeGenerator_p.h"
+ 
+-#include <llvm/CallingConv.h>
+-#include <llvm/Constants.h>
+-#include <llvm/Function.h>
+-#include <llvm/Instructions.h>
+-#include <llvm/Module.h>
+-#include <llvm/Value.h>
++#include <llvm/IR/CallingConv.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/Value.h>
+ 
+ #include "GTLCore/Debug.h"
+ #include "ExpressionResult_p.h"
+diff --git a/OpenGTL/GTLCore/LLVMBackend/ContextManager_p.cpp b/OpenGTL/GTLCore/LLVMBackend/ContextManager_p.cpp
+index 8093104..926eae9 100644
+--- a/OpenGTL/GTLCore/LLVMBackend/ContextManager_p.cpp
++++ b/OpenGTL/GTLCore/LLVMBackend/ContextManager_p.cpp
+@@ -20,7 +20,7 @@
+ #include "ContextManager_p.h"
+ 
+ #include <llvm/Support/ThreadLocal.h>
+-#include <llvm/LLVMContext.h>
++#include <llvm/IR/LLVMContext.h>
+ 
+ using namespace LLVMBackend;
+ 
+diff --git a/OpenGTL/GTLCore/LLVMBackend/ExpressionGenerationContext_p.cpp b/OpenGTL/GTLCore/LLVMBackend/ExpressionGenerationContext_p.cpp
+index 114c747..d893be9 100644
+--- a/OpenGTL/GTLCore/LLVMBackend/ExpressionGenerationContext_p.cpp
++++ b/OpenGTL/GTLCore/LLVMBackend/ExpressionGenerationContext_p.cpp
+@@ -20,7 +20,7 @@
+ #include "ExpressionGenerationContext_p.h"
+ 
+ #include "GTLCore/Debug.h"
+-#include <llvm/BasicBlock.h>
++#include <llvm/IR/BasicBlock.h>
+ 
+ #include "GTLCore/Macros_p.h"
+ 
+diff --git a/OpenGTL/GTLCore/LLVMBackend/ExpressionResult_p.cpp b/OpenGTL/GTLCore/LLVMBackend/ExpressionResult_p.cpp
+index 069b1cf..db0ef4a 100644
+--- a/OpenGTL/GTLCore/LLVMBackend/ExpressionResult_p.cpp
++++ b/OpenGTL/GTLCore/LLVMBackend/ExpressionResult_p.cpp
+@@ -19,8 +19,8 @@
+ 
+ #include "ExpressionResult_p.h"
+ 
+-#include "llvm/Constant.h"
+-#include "llvm/DerivedTypes.h"
++#include "llvm/IR/Constant.h"
++#include "llvm/IR/DerivedTypes.h"
+ 
+ #include "../Type.h"
+ #include "../Type_p.h"
+diff --git a/OpenGTL/GTLCore/LLVMBackend/GenerationContext_p.cpp b/OpenGTL/GTLCore/LLVMBackend/GenerationContext_p.cpp
+index cc202e5..4fcfcbf 100644
+--- a/OpenGTL/GTLCore/LLVMBackend/GenerationContext_p.cpp
++++ b/OpenGTL/GTLCore/LLVMBackend/GenerationContext_p.cpp
+@@ -22,8 +22,8 @@
+ #include "GTLCore/ModuleData_p.h"
+ #include "GTLCore/Debug.h"
+ 
+-#include "llvm/BasicBlock.h"
+-#include "llvm/Function.h"
++#include "llvm/IR/BasicBlock.h"
++#include "llvm/IR/Function.h"
+ 
+ #include "GTLCore/AST/Statement.h"
+ 
+diff --git a/OpenGTL/GTLCore/LLVMBackend/Visitor_p.cpp b/OpenGTL/GTLCore/LLVMBackend/Visitor_p.cpp
+index 7aa8750..e943f38 100644
+--- a/OpenGTL/GTLCore/LLVMBackend/Visitor_p.cpp
++++ b/OpenGTL/GTLCore/LLVMBackend/Visitor_p.cpp
+@@ -20,12 +20,12 @@
+ #include "Visitor_p.h"
+ 
+ // LLVM
+-#include <llvm/BasicBlock.h>
+-#include <llvm/Constants.h>
+-#include <llvm/Function.h>
+-#include <llvm/Instructions.h>
+-#include <llvm/Module.h>
+-#include <llvm/GlobalVariable.h>
++#include <llvm/IR/BasicBlock.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/GlobalVariable.h>
+ 
+ // GTLCore
+ #include "CodeGenerator_p.h"
+diff --git a/OpenGTL/GTLCore/ModuleData_p.cpp b/OpenGTL/GTLCore/ModuleData_p.cpp
+index 93fc13a..e634749 100644
+--- a/OpenGTL/GTLCore/ModuleData_p.cpp
++++ b/OpenGTL/GTLCore/ModuleData_p.cpp
+@@ -21,7 +21,7 @@
+ 
+ #include <sstream>
+ 
+-#include <llvm/Module.h>
++#include <llvm/IR/Module.h>
+ #include <llvm/PassManager.h>
+ #include <llvm/Target/TargetMachine.h>
+ #include <llvm/Analysis/Verifier.h>
+@@ -275,11 +275,6 @@ void ModuleData::doLink()
+     GTL_DEBUG("Linking error: " << errorMessage );
+     delete clone;
+   }
+-  foreach( const GTLCore::String& mod, m_linkModuleWithArchives )
+-  {
+-    bool v = false;
+-    linker.LinkInArchive( llvm::sys::Path( (const std::string&) mod), v);
+-  }
+   
+   linker.releaseModule();
+   
+diff --git a/OpenGTL/GTLCore/Type.cpp b/OpenGTL/GTLCore/Type.cpp
+index 07ca312..71c00de 100644
+--- a/OpenGTL/GTLCore/Type.cpp
++++ b/OpenGTL/GTLCore/Type.cpp
+@@ -25,7 +25,7 @@
+ 
+ #include <iostream>
+ 
+-#include <llvm/DerivedTypes.h>
++#include <llvm/IR/DerivedTypes.h>
+ 
+ #include "wrappers/StructWrap.h"
+ #include "SharedPointer.h"
+diff --git a/OpenGTL/GTLCore/Type_p.cpp b/OpenGTL/GTLCore/Type_p.cpp
+index 476b248..c014087 100644
+--- a/OpenGTL/GTLCore/Type_p.cpp
++++ b/OpenGTL/GTLCore/Type_p.cpp
+@@ -30,8 +30,8 @@
+ 
+ using namespace GTLCore;
+ 
+-#include <llvm/Type.h>
+-#include <llvm/DerivedTypes.h>
++#include <llvm/IR/Type.h>
++#include <llvm/IR/DerivedTypes.h>
+ 
+ Type::StructDataMember::Information::~Information()
+ {
+diff --git a/OpenGTL/GTLCore/Value_p.cpp b/OpenGTL/GTLCore/Value_p.cpp
+index 1591132..ac01d0b 100644
+--- a/OpenGTL/GTLCore/Value_p.cpp
++++ b/OpenGTL/GTLCore/Value_p.cpp
+@@ -19,8 +19,8 @@
+ 
+ #include "Value_p.h"
+ 
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Type.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Type.h>
+ 
+ #include "Debug.h"
+ #include "Value.h"
+diff --git a/OpenGTL/GTLCore/VariableNG_p.cpp b/OpenGTL/GTLCore/VariableNG_p.cpp
+index bd41e66..661b365 100644
+--- a/OpenGTL/GTLCore/VariableNG_p.cpp
++++ b/OpenGTL/GTLCore/VariableNG_p.cpp
+@@ -19,8 +19,8 @@
+ 
+ #include "VariableNG_p.h"
+ 
+-#include <llvm/Constants.h>
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/Instructions.h>
+ 
+ #include "LLVMBackend/CodeGenerator_p.h"
+ #include "Debug.h"
+diff --git a/OpenGTL/GTLCore/VirtualMachine_p.cpp b/OpenGTL/GTLCore/VirtualMachine_p.cpp
+index d724cd2..1f88056 100644
+--- a/OpenGTL/GTLCore/VirtualMachine_p.cpp
++++ b/OpenGTL/GTLCore/VirtualMachine_p.cpp
+@@ -21,10 +21,10 @@
+ 
+ // JIT
+ #include <llvm/ExecutionEngine/ExecutionEngine.h>
+-#include <llvm/Module.h>
+-#include <llvm/DerivedTypes.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/DerivedTypes.h>
+ #include <llvm/Target/TargetOptions.h>
+-#include <llvm/LLVMContext.h>
++#include <llvm/IR/LLVMContext.h>
+ #include <llvm/Support/CommandLine.h>
+ #include <llvm/Support/Threading.h>
+ #include <llvm/Support/ErrorHandling.h>
+@@ -48,7 +48,8 @@ struct VirtualMachine::Private {
+ VirtualMachine* VirtualMachine::Private::virtualMachine = 0;
+ int VirtualMachine::Private::optimLevel = 2;
+ 
+-void gtl_llvm_error_handler(void *user_data, const std::string& reason)
++void gtl_llvm_error_handler(void *user_data, const std::string& reason,
++			    bool gen_crash_diag)
+ {
+   GTL_ABORT(reason);
+ }
+@@ -58,11 +59,7 @@ VirtualMachine::VirtualMachine() : d(new Private)
+ {
+   d->executionEngine = 0;
+   
+-#ifdef LLVM_27
+-  llvm::llvm_install_error_handler(&gtl_llvm_error_handler);
+-#else
+-  llvm::install_fatal_error_handler(&gtl_llvm_error_handler);
+-#endif
++  llvm::install_fatal_error_handler(gtl_llvm_error_handler);
+   
+   llvm::llvm_start_multithreaded();
+ 
+diff --git a/OpenGTL/GTLFragment/Compiler_p.cpp b/OpenGTL/GTLFragment/Compiler_p.cpp
+index 93efa5a..b9285b1 100644
+--- a/OpenGTL/GTLFragment/Compiler_p.cpp
++++ b/OpenGTL/GTLFragment/Compiler_p.cpp
+@@ -19,7 +19,7 @@
+ 
+ #include "Compiler_p.h"
+ 
+-#include <llvm/Module.h>
++#include <llvm/IR/Module.h>
+ #include <llvm/PassManager.h>
+ 
+ #include "GTLCore/AST/Expression.h"
+diff --git a/OpenGTL/GTLFragment/Library.cpp b/OpenGTL/GTLFragment/Library.cpp
+index 165e6b7..bc2abca 100644
+--- a/OpenGTL/GTLFragment/Library.cpp
++++ b/OpenGTL/GTLFragment/Library.cpp
+@@ -22,9 +22,9 @@
+ 
+ #include <sstream>
+ 
+-#include <llvm/Module.h>
++#include <llvm/IR/Module.h>
+ #include <llvm/Support/DynamicLibrary.h>
+-#include <llvm/LLVMContext.h>
++#include <llvm/IR/LLVMContext.h>
+ 
+ #include "GTLCore/CompilationMessage.h"
+ #include "GTLCore/Function.h"
+diff --git a/OpenGTL/GTLFragment/Wrapper.cpp b/OpenGTL/GTLFragment/Wrapper.cpp
+index 5d10089..730048d 100644
+--- a/OpenGTL/GTLFragment/Wrapper.cpp
++++ b/OpenGTL/GTLFragment/Wrapper.cpp
+@@ -29,7 +29,7 @@
+ 
+ #include "Library.h"
+ #include <GTLCore/Function_p.h>
+-#include <llvm/Module.h>
++#include <llvm/IR/Module.h>
+ #include <GTLCore/Type_p.h>
+ 
+ using namespace GTLFragment;
+diff --git a/OpenShiva/OpenShiva/CodeGenerator_p.cpp b/OpenShiva/OpenShiva/CodeGenerator_p.cpp
+index 7377648..c322860 100644
+--- a/OpenShiva/OpenShiva/CodeGenerator_p.cpp
++++ b/OpenShiva/OpenShiva/CodeGenerator_p.cpp
+@@ -21,14 +21,14 @@
+ 
+ #include <vector>
+ 
+-#include <llvm/CallingConv.h>
+-#include <llvm/Constants.h>
+-#include <llvm/Constant.h>
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Function.h>
+-#include <llvm/Instructions.h>
+-#include <llvm/Module.h>
+-#include <llvm/Value.h>
++#include <llvm/IR/CallingConv.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/Constant.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Module.h>
++#include <llvm/IR/Value.h>
+ 
+ #include "GTLCore/LLVMBackend/CodeGenerator_p.h"
+ #include "GTLCore/LLVMBackend/ExpressionResult_p.h"
+diff --git a/OpenShiva/OpenShiva/ColorToPixelOverloadOperatorFactory_p.cpp b/OpenShiva/OpenShiva/ColorToPixelOverloadOperatorFactory_p.cpp
+index bf93ca9..bdd9f70 100644
+--- a/OpenShiva/OpenShiva/ColorToPixelOverloadOperatorFactory_p.cpp
++++ b/OpenShiva/OpenShiva/ColorToPixelOverloadOperatorFactory_p.cpp
+@@ -28,13 +28,13 @@
+ #include "CodeGenerator_p.h"
+ #include <GTLFragment/wrappers/ColorWrap_p.h>
+ #include <GTLCore/Type_p.h>
+-#include <llvm/Value.h>
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/CallingConv.h>
+-#include <llvm/Module.h>
++#include <llvm/IR/Value.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/CallingConv.h>
++#include <llvm/IR/Module.h>
+ #include <GTLCore/LLVMBackend/ExpressionGenerationContext_p.h>
+ #include <GTLCore/LLVMBackend/CodeGenerator_p.h>
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Instructions.h>
+ #include <GTLCore/TypesManager.h>
+ 
+ using namespace OpenShiva;
+diff --git a/OpenShiva/OpenShiva/Kernel.cpp b/OpenShiva/OpenShiva/Kernel.cpp
+index 363f00d..58fd8be 100644
+--- a/OpenShiva/OpenShiva/Kernel.cpp
++++ b/OpenShiva/OpenShiva/Kernel.cpp
+@@ -22,7 +22,7 @@
+ #include <sstream>
+ #include <fstream>
+ 
+-#include <llvm/Module.h>
++#include <llvm/IR/Module.h>
+ 
+ #include "GTLCore/CompilationMessage.h"
+ #include "GTLCore/Function.h"
+@@ -48,7 +48,7 @@
+ #include "wrappers/ImageWrap_p.h"
+ #include "wrappers/RegionWrap_p.h"
+ #include <GTLCore/AST/Tree.h>
+-#include <llvm/DerivedTypes.h>
++#include <llvm/IR/DerivedTypes.h>
+ 
+ using namespace OpenShiva;
+ 
+diff --git a/OpenShiva/OpenShiva/PixelConvertExpressionFactory_p.cpp b/OpenShiva/OpenShiva/PixelConvertExpressionFactory_p.cpp
+index 8a535c6..49d94e4 100644
+--- a/OpenShiva/OpenShiva/PixelConvertExpressionFactory_p.cpp
++++ b/OpenShiva/OpenShiva/PixelConvertExpressionFactory_p.cpp
+@@ -19,7 +19,8 @@
+ 
+ #include "PixelConvertExpressionFactory_p.h"
+ 
+-#include <llvm/Instructions.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Function.h>
+ 
+ #include "GTLCore/Type.h"
+ #include "GTLCore/AST/ConvertExpression.h"
+@@ -34,7 +35,6 @@
+ #include <GTLCore/VariableNG_p.h>
+ #include <GTLCore/LLVMBackend/Visitor_p.h>
+ #include <GTLFragment/wrappers/ColorWrap_p.h>
+-#include <llvm/Function.h>
+ #include <GTLCore/Type_p.h>
+ 
+ using namespace OpenShiva;
+diff --git a/OpenShiva/OpenShiva/PixelVisitor_p.cpp b/OpenShiva/OpenShiva/PixelVisitor_p.cpp
+index 2f43ef9..f4bca24 100644
+--- a/OpenShiva/OpenShiva/PixelVisitor_p.cpp
++++ b/OpenShiva/OpenShiva/PixelVisitor_p.cpp
+@@ -20,11 +20,11 @@
+ #include "PixelVisitor_p.h"
+ 
+ // LLVM
+-#include <llvm/Constant.h>
+-#include <llvm/Constants.h>
+-#include <llvm/BasicBlock.h>
+-#include <llvm/Instructions.h>
+-#include <llvm/Function.h>
++#include <llvm/IR/Constant.h>
++#include <llvm/IR/Constants.h>
++#include <llvm/IR/BasicBlock.h>
++#include <llvm/IR/Instructions.h>
++#include <llvm/IR/Function.h>
+ 
+ #include "GTLCore/LLVMBackend/ExpressionResult_p.h"
+ #include "GTLCore/LLVMBackend/ExpressionGenerationContext_p.h"
+diff --git a/OpenShiva/OpenShiva/Wrapper_p.cpp b/OpenShiva/OpenShiva/Wrapper_p.cpp
+index db1d105..02ba8d2 100644
+--- a/OpenShiva/OpenShiva/Wrapper_p.cpp
++++ b/OpenShiva/OpenShiva/Wrapper_p.cpp
+@@ -22,9 +22,9 @@
+ #include <map>
+ #include <vector>
+ 
+-#include <llvm/DerivedTypes.h>
+-#include <llvm/Function.h>
+-#include <llvm/Module.h>
++#include <llvm/IR/DerivedTypes.h>
++#include <llvm/IR/Function.h>
++#include <llvm/IR/Module.h>
+ 
+ #include "GTLCore/Function_p.h"
+ #include "GTLCore/Macros.h"


More information about the scm-commits mailing list