mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 14:40:40 +03:00
Add support for 'noreturn' type
It's apparently already in the AST, e.g., for core.internal.abort.
This commit is contained in:
parent
c0630840b7
commit
44daef934a
9 changed files with 23 additions and 9 deletions
|
@ -665,9 +665,12 @@ void DtoDeclareFunction(FuncDeclaration *fdecl, const bool willDefine) {
|
|||
// such that they can be overridden by UDAs.
|
||||
applyTargetMachineAttributes(*func, *gTargetMachine);
|
||||
if (!fdecl->fbody && opts::noPLT) {
|
||||
// Add `NonLazyBind` attribute to function declarations,
|
||||
// the codegen options allow skipping PLT.
|
||||
func->addFnAttr(LLAttribute::NonLazyBind);
|
||||
// Add `NonLazyBind` attribute to function declarations,
|
||||
// the codegen options allow skipping PLT.
|
||||
func->addFnAttr(LLAttribute::NonLazyBind);
|
||||
}
|
||||
if (f->next->toBasetype()->ty == Tnoreturn) {
|
||||
func->addFnAttr(LLAttribute::NoReturn);
|
||||
}
|
||||
|
||||
applyFuncDeclUDAs(fdecl, irFunc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue