Stupidly warning about multiple definitions if a following one is in
fact just a forward-declaration.
This commit is contained in:
Martin 2017-10-22 22:38:07 +02:00
parent ca90dbb47e
commit 782190f8f4

View file

@ -921,6 +921,10 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
return;
}
if (!fd->fbody) {
return;
}
IrFunction *const irFunc = getIrFunc(fd);
llvm::Function *const func = irFunc->getLLVMFunc();
@ -932,10 +936,6 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
return;
}
if (!fd->fbody) {
return;
}
// debug info
irFunc->diSubprogram = gIR->DBuilder.EmitSubProgram(fd);