Fix build to work with LLVM top-of-tree again
This commit is contained in:
25
func.cpp
25
func.cpp
@@ -46,12 +46,21 @@
|
||||
#include "util.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <llvm/LLVMContext.h>
|
||||
#include <llvm/Module.h>
|
||||
#include <llvm/Type.h>
|
||||
#include <llvm/DerivedTypes.h>
|
||||
#include <llvm/Instructions.h>
|
||||
#include <llvm/Intrinsics.h>
|
||||
#if defined(LLVM_3_0) || defined(LLVM_3_1) || defined(LLVM_3_2)
|
||||
#include <llvm/LLVMContext.h>
|
||||
#include <llvm/Module.h>
|
||||
#include <llvm/Type.h>
|
||||
#include <llvm/Instructions.h>
|
||||
#include <llvm/Intrinsics.h>
|
||||
#include <llvm/DerivedTypes.h>
|
||||
#else
|
||||
#include <llvm/IR/LLVMContext.h>
|
||||
#include <llvm/IR/Module.h>
|
||||
#include <llvm/IR/Type.h>
|
||||
#include <llvm/IR/Instructions.h>
|
||||
#include <llvm/IR/Intrinsics.h>
|
||||
#include <llvm/IR/DerivedTypes.h>
|
||||
#endif
|
||||
#include <llvm/PassManager.h>
|
||||
#include <llvm/PassRegistry.h>
|
||||
#include <llvm/Transforms/IPO.h>
|
||||
@@ -303,8 +312,10 @@ Function::emitCode(FunctionEmitContext *ctx, llvm::Function *function,
|
||||
(
|
||||
#if defined(LLVM_3_0) || defined(LLVM_3_1)
|
||||
(function->hasFnAttr(llvm::Attribute::AlwaysInline) == false)
|
||||
#else
|
||||
#elif defined(LLVM_3_2)
|
||||
(function->getFnAttributes().hasAttribute(llvm::Attributes::AlwaysInline) == false)
|
||||
#else // LLVM 3.3+
|
||||
(function->getAttributes().getFnAttributes().hasAttribute(llvm::Attribute::AlwaysInline) == false)
|
||||
#endif
|
||||
&&
|
||||
costEstimate > CHECK_MASK_AT_FUNCTION_START_COST);
|
||||
|
||||
Reference in New Issue
Block a user