merged with master

This commit is contained in:
evghenii
2014-08-11 10:04:54 +02:00
37 changed files with 1199 additions and 617 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)
#error "Only LLVM 3.1, 3.2, 3.3, 3.4 and the 3.5 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;
@@ -244,11 +240,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;}
@@ -305,12 +297,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). */
@@ -331,7 +318,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 */