Remove support for building with LLVM 3.0

This commit is contained in:
Matt Pharr
2013-01-06 12:27:53 -08:00
parent 81dbd504aa
commit 0bf1320a32
17 changed files with 74 additions and 280 deletions

View File

@@ -46,7 +46,7 @@
#include "util.h"
#include <stdio.h>
#if defined(LLVM_3_0) || defined(LLVM_3_1) || defined(LLVM_3_2)
#if defined(LLVM_3_1) || defined(LLVM_3_2)
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
#include <llvm/Type.h>
@@ -310,7 +310,7 @@ Function::emitCode(FunctionEmitContext *ctx, llvm::Function *function,
// isn't worth the code bloat / overhead.
bool checkMask = (type->isTask == true) ||
(
#if defined(LLVM_3_0) || defined(LLVM_3_1)
#if defined(LLVM_3_1)
(function->hasFnAttr(llvm::Attribute::AlwaysInline) == false)
#elif defined(LLVM_3_2)
(function->getFnAttributes().hasAttribute(llvm::Attributes::AlwaysInline) == false)
@@ -453,7 +453,7 @@ Function::GenerateIR() {
functionName += std::string("_") + g->target.GetISAString();
llvm::Function *appFunction =
llvm::Function::Create(ftype, linkage, functionName.c_str(), m->module);
#if defined(LLVM_3_0) || defined(LLVM_3_1)
#if defined(LLVM_3_1)
appFunction->setDoesNotThrow(true);
#else
appFunction->setDoesNotThrow();