Mercurial > projects > ldc
changeset 528:3197ffdc2811
Fixed problem with parameterized intrinsics taking bools.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 20 Aug 2008 19:01:56 +0200 |
parents | cecfee2d01a8 |
children | cef0cbcf7d22 |
files | gen/llvmhelpers.cpp |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp Wed Aug 20 01:02:22 2008 +0200 +++ b/gen/llvmhelpers.cpp Wed Aug 20 19:01:56 2008 +0200 @@ -1570,7 +1570,10 @@ 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;