From c400d180d2c58be3b1d61a21775c3ea4679a25a3 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 19 Oct 2013 19:27:38 +0200 Subject: [PATCH] Immediately exit on function type mismatch to avoid LLVM crash. --- gen/functions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/gen/functions.cpp b/gen/functions.cpp index 92bc713f..2761991e 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -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));