mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 07:30:43 +03:00
Drop support for LLVM < 3.5
This allows to clean up the code a little.
This commit is contained in:
parent
8eab25f2fa
commit
60d676e2a1
57 changed files with 35 additions and 1019 deletions
|
@ -34,16 +34,8 @@
|
|||
#include "gen/tollvm.h"
|
||||
#include "ir/irfunction.h"
|
||||
#include "ir/irmodule.h"
|
||||
#if LDC_LLVM_VER >= 303
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#else
|
||||
#include "llvm/Intrinsics.h"
|
||||
#endif
|
||||
#if LDC_LLVM_VER >= 305
|
||||
#include "llvm/IR/CFG.h"
|
||||
#else
|
||||
#include "llvm/Support/CFG.h"
|
||||
#endif
|
||||
#include <iostream>
|
||||
|
||||
llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype, Type* nesttype,
|
||||
|
@ -102,10 +94,8 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
|
|||
{
|
||||
// Add the this pointer for member functions
|
||||
AttrBuilder attrBuilder;
|
||||
#if LDC_LLVM_VER >= 303
|
||||
if (isCtor)
|
||||
attrBuilder.add(LDC_ATTRIBUTE(Returned));
|
||||
#endif
|
||||
newIrFty.arg_this = new IrFuncTyArg(thistype, thistype->toBasetype()->ty == Tstruct, attrBuilder);
|
||||
++nextLLArgIdx;
|
||||
}
|
||||
|
@ -788,7 +778,6 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
{
|
||||
func->addFnAttr(LDC_ATTRIBUTE(UWTable));
|
||||
}
|
||||
#if LDC_LLVM_VER >= 303
|
||||
if (opts::sanitize != opts::None) {
|
||||
// Set the required sanitizer attribute.
|
||||
if (opts::sanitize == opts::AddressSanitizer) {
|
||||
|
@ -803,7 +792,6 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
func->addFnAttr(LDC_ATTRIBUTE(SanitizeThread));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
llvm::BasicBlock* beginbb = llvm::BasicBlock::Create(gIR->context(), "", func);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue