Immediately exit on function type mismatch to avoid LLVM crash.

This commit is contained in:
David Nadlinger 2013-10-19 19:27:38 +02:00 committed by Kai Nacke
parent 01b6d55770
commit c400d180d2

View file

@ -767,6 +767,7 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
}
} else if (func->getFunctionType() != functype) {
error(fdecl->loc, "Function type does not match previously declared function with the same mangled name: %s", fdecl->mangle());
fatal();
}
func->setCallingConv(gABI->callingConv(link));