From 2e1a2bfe4a444db8fee8f075f533072623d7f45f Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Wed, 20 Aug 2008 19:01:56 +0200 Subject: [PATCH] Fixed problem with parameterized intrinsics taking bools. --- gen/llvmhelpers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 980ef59b..b86fe2bd 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1570,7 +1570,10 @@ void DtoOverloadedIntrinsicName(TemplateInstance* ti, TemplateDeclaration* td, s Type* T = (Type*)ti->tdtypes.data[0]; char tmp[10]; - sprintf(tmp, "%d", T->size()*8); + if (T->toBasetype()->ty == Tbool) // otherwise we'd get a mismatch + sprintf(tmp, "1"); + else + sprintf(tmp, "%d", T->size()*8); // replace # in name with bitsize name = td->intrinsicName;