Remove support for building with LLVM 3.1

This commit is contained in:
Matt Pharr
2013-07-31 06:46:45 -07:00
parent d7562d3836
commit d3c567503b
21 changed files with 84 additions and 320 deletions

View File

@@ -46,7 +46,7 @@
#include "util.h"
#include <stdio.h>
#if defined(LLVM_3_1) || defined(LLVM_3_2)
#if defined(LLVM_3_2)
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
#include <llvm/Type.h>
@@ -310,9 +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_1)
(function->hasFnAttr(llvm::Attribute::AlwaysInline) == false)
#elif defined(LLVM_3_2)
#if defined(LLVM_3_2)
(function->getFnAttributes().hasAttribute(llvm::Attributes::AlwaysInline) == false)
#else // LLVM 3.3+
(function->getAttributes().getFnAttributes().hasAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attribute::AlwaysInline) == false)
@@ -453,11 +451,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_1)
appFunction->setDoesNotThrow(true);
#else
appFunction->setDoesNotThrow();
#endif
g->target->markFuncWithTargetAttr(appFunction);