mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +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
|
@ -439,29 +439,13 @@ IrFunction::IrFunction(FuncDeclaration* fd) {
|
|||
}
|
||||
|
||||
void IrFunction::setNeverInline() {
|
||||
#if LDC_LLVM_VER >= 303
|
||||
assert(!func->getAttributes().hasAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attribute::AlwaysInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attribute::NoInline);
|
||||
#elif LDC_LLVM_VER == 302
|
||||
assert(!func->getFnAttributes().hasAttribute(llvm::Attributes::AlwaysInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attributes::NoInline);
|
||||
#else
|
||||
assert(!func->hasFnAttr(llvm::Attribute::AlwaysInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attribute::NoInline);
|
||||
#endif
|
||||
}
|
||||
|
||||
void IrFunction::setAlwaysInline() {
|
||||
#if LDC_LLVM_VER >= 303
|
||||
assert(!func->getAttributes().hasAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attribute::NoInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attribute::AlwaysInline);
|
||||
#elif LDC_LLVM_VER == 302
|
||||
assert(!func->getFnAttributes().hasAttribute(llvm::Attributes::NoInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attributes::AlwaysInline);
|
||||
#else
|
||||
assert(!func->hasFnAttr(llvm::Attribute::NoInline) && "function can't be never- and always-inline at the same time");
|
||||
func->addFnAttr(llvm::Attribute::AlwaysInline);
|
||||
#endif
|
||||
}
|
||||
|
||||
llvm::AllocaInst* IrFunction::getOrCreateEhPtrSlot() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue