mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
Merged 2.061 frontend.
This commit is contained in:
@@ -705,7 +705,14 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
|
||||
fdecl->ir.irFunc->func = func;
|
||||
|
||||
// calling convention
|
||||
if (!vafunc && fdecl->llvmInternal != LLVMintrinsic)
|
||||
if (!vafunc && fdecl->llvmInternal != LLVMintrinsic
|
||||
#if DMDV2
|
||||
// DMD treats _Dmain as having C calling convention and this has been
|
||||
// hardcoded into druntime, even if the frontend type has D linkage.
|
||||
// See Bugzilla issue 9028.
|
||||
&& !fdecl->isMain()
|
||||
#endif
|
||||
)
|
||||
func->setCallingConv(DtoCallingConv(fdecl->loc, f->linkage));
|
||||
else // fall back to C, it should be the right thing to do
|
||||
func->setCallingConv(llvm::CallingConv::C);
|
||||
|
||||
Reference in New Issue
Block a user