wiped out all LLVM 3.1 support

This commit is contained in:
Anton Mitrokhin
2014-08-01 14:54:08 +04:00
parent 9189bbb7d3
commit d0c9b7c9b5
29 changed files with 136 additions and 460 deletions

19
ispc.h
View File

@@ -40,8 +40,8 @@
#define ISPC_VERSION "1.7.1dev"
#if !defined(LLVM_3_1) && !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) && !defined(LLVM_3_5) && !defined(LLVM_3_6)
#error "Only LLVM 3.1, 3.2, 3.3, 3.4, 3.5 and the 3.6 development branch are supported"
#if !defined(LLVM_3_2) && !defined(LLVM_3_3) && !defined(LLVM_3_4) && !defined(LLVM_3_5) && !defined(LLVM_3_6)
#error "Only LLVM 3.2, 3.3, 3.4, 3.5 and the 3.6 development branch are supported"
#endif
#if defined(_WIN32) || defined(_WIN64)
@@ -76,11 +76,7 @@ namespace llvm {
class BasicBlock;
class Constant;
class ConstantValue;
#if defined(LLVM_3_1)
class TargetData;
#else
class DataLayout;
#endif
class DIBuilder;
class DIDescriptor;
class DIFile;
@@ -241,11 +237,7 @@ public:
// Note the same name of method for 3.1 and 3.2+, this allows
// to reduce number ifdefs on client side.
#if defined(LLVM_3_1)
llvm::TargetData *getDataLayout() const {return m_targetData;}
#else
llvm::DataLayout *getDataLayout() const {return m_dataLayout;}
#endif
/** Reports if Target object has valid state. */
bool isValid() const {return m_valid;}
@@ -302,12 +294,7 @@ private:
must not be used.
*/
llvm::TargetMachine *m_targetMachine;
#if defined(LLVM_3_1)
llvm::TargetData *m_targetData;
#else
llvm::DataLayout *m_dataLayout;
#endif
/** flag to report invalid state after construction
(due to bad parameters passed to constructor). */
@@ -328,7 +315,7 @@ private:
/** Target-specific attribute string to pass along to the LLVM backend */
std::string m_attributes;
#if !defined(LLVM_3_1) && !defined(LLVM_3_2)
#if !defined(LLVM_3_2)
/** Target-specific LLVM attribute, which has to be attached to every
function to ensure that it is generated for correct target architecture.
This is requirement was introduced in LLVM 3.3 */