Small fixes to build with LLVM top-of-tree (now numbered as version 3.3)

This commit is contained in:
Matt Pharr
2012-12-02 14:29:24 -08:00
parent e82b649ec0
commit 8cbfde6092
4 changed files with 11 additions and 5 deletions

View File

@@ -71,7 +71,11 @@
#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h" #include "llvm/Support/FormattedStream.h"
#include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/InstVisitor.h" #if defined(LLVM_3_3)
#include "llvm/InstVisitor.h"
#else
#include "llvm/Support/InstVisitor.h"
#endif
#include "llvm/Support/MathExtras.h" #include "llvm/Support/MathExtras.h"
#include "llvm/Support/TargetRegistry.h" #include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/Host.h" #include "llvm/Support/Host.h"

View File

@@ -129,9 +129,9 @@ lGetSystemISA() {
static const char *supportedCPUs[] = { static const char *supportedCPUs[] = {
"atom", "penryn", "core2", "corei7", "corei7-avx" "atom", "penryn", "core2", "corei7", "corei7-avx"
#ifdef LLVM_3_2 #if defined(LLVM_3_2) || defined(LLVM_3_3)
, "core-avx-i", "core-avx2" , "core-avx-i", "core-avx2"
#endif // LLVM_3_2 #endif // LLVM_3_2 or LLVM_3_3
}; };

4
ispc.h
View File

@@ -40,8 +40,8 @@
#define ISPC_VERSION "1.3.1dev" #define ISPC_VERSION "1.3.1dev"
#if !defined(LLVM_3_0) && !defined(LLVM_3_1) && !defined(LLVM_3_2) #if !defined(LLVM_3_0) && !defined(LLVM_3_1) && !defined(LLVM_3_2) && !defined(LLVM_3_3)
#error "Only LLVM 3.0, 3.1, and the 3.2 development branch are supported" #error "Only LLVM 3.0, 3.1, 3.2, and the 3.3 development branch are supported"
#endif #endif
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)

View File

@@ -68,6 +68,8 @@ lPrintVersion() {
"3.1" "3.1"
#elif defined(LLVM_3_2) #elif defined(LLVM_3_2)
"3.2" "3.2"
#elif defined(LLVM_3_3)
"3.3"
#else #else
#error "Unhandled LLVM version" #error "Unhandled LLVM version"
#endif #endif