comparison gen/llvmhelpers.cpp @ 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 12bda38ea366
comparison
equal deleted inserted replaced
527:cecfee2d01a8 528:3197ffdc2811
1568 // for now use the size in bits of the first template param in the instance 1568 // for now use the size in bits of the first template param in the instance
1569 assert(ti->tdtypes.dim == 1); 1569 assert(ti->tdtypes.dim == 1);
1570 Type* T = (Type*)ti->tdtypes.data[0]; 1570 Type* T = (Type*)ti->tdtypes.data[0];
1571 1571
1572 char tmp[10]; 1572 char tmp[10];
1573 sprintf(tmp, "%d", T->size()*8); 1573 if (T->toBasetype()->ty == Tbool) // otherwise we'd get a mismatch
1574 sprintf(tmp, "1");
1575 else
1576 sprintf(tmp, "%d", T->size()*8);
1574 1577
1575 // replace # in name with bitsize 1578 // replace # in name with bitsize
1576 name = td->intrinsicName; 1579 name = td->intrinsicName;
1577 1580
1578 std::string needle("#"); 1581 std::string needle("#");