Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 1167:ed4b050ada45
Another big-endian fix. (Don't lie to [s]printf...)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 29 Mar 2009 03:53:22 +0200 |
parents | 7d28dcbff23e |
children | 8baf611f0009 |
comparison
equal
deleted
inserted
replaced
1166:c6f39553b702 | 1167:ed4b050ada45 |
---|---|
1314 ti->error("has invalid template parameter for intrinsic: %s", T->toChars()); | 1314 ti->error("has invalid template parameter for intrinsic: %s", T->toChars()); |
1315 fatal(); // or LLVM asserts | 1315 fatal(); // or LLVM asserts |
1316 } | 1316 } |
1317 | 1317 |
1318 char tmp[21]; // probably excessive, but covers a uint64_t | 1318 char tmp[21]; // probably excessive, but covers a uint64_t |
1319 sprintf(tmp, "%lu", gTargetData->getTypeSizeInBits(DtoType(T))); | 1319 sprintf(tmp, "%lu", (unsigned long) gTargetData->getTypeSizeInBits(DtoType(T))); |
1320 | 1320 |
1321 // replace # in name with bitsize | 1321 // replace # in name with bitsize |
1322 name = td->intrinsicName; | 1322 name = td->intrinsicName; |
1323 | 1323 |
1324 std::string needle("#"); | 1324 std::string needle("#"); |