[llvm-commits] [poolalloc] r132464 - /poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
Arushi Aggarwal
aggarwa4 at illinois.edu
Thu Jun 2 10:10:43 PDT 2011
Author: aggarwa4
Date: Thu Jun 2 12:10:43 2011
New Revision: 132464
URL: http://llvm.org/viewvc/llvm-project?rev=132464&view=rev
Log:
Improve the error printing.
Modified:
poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
Modified: poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c?rev=132464&r1=132463&r2=132464&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c (original)
+++ poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c Thu Jun 2 12:10:43 2011
@@ -118,7 +118,7 @@
*/
void compareTypes(uint8_t typeNumberSrc, uint8_t typeNumberDest, uint32_t tag) {
if(typeNumberSrc != typeNumberDest) {
- printf("Type mismatch: detecting %u, expecting %u! %u %s, %s\n", typeNumberDest, typeNumberSrc, tag, typeNames[typeNumberDest], typeNames[typeNumberSrc]);
+ printf("Type mismatch(%u): detecting %s, expecting %s! \n", tag, typeNames[typeNumberDest], typeNames[typeNumberSrc]);
}
}
@@ -127,7 +127,7 @@
*/
void compareNumber(uint64_t NumArgsPassed, uint64_t ArgAccessed, uint32_t tag){
if(ArgAccessed > NumArgsPassed) {
- printf("Type mismatch: Accessing variable %lu, passed only %lu! %u \n", ArgAccessed, NumArgsPassed, tag);
+ printf("Type mismatch(%u): Accessing variable %lu, passed only %lu! \n", tag, ArgAccessed, NumArgsPassed);
}
}
@@ -152,14 +152,14 @@
/* Check if this an initialized but untyped memory.*/
if (typeNumber != shadow_begin[p]) {
if (shadow_begin[p] != 0xFF) {
- printf("Type mismatch: detecting %u, expecting %u! %u %s %s\n", typeNumber, shadow_begin[p], tag, typeNames[typeNumber], typeNames[shadow_begin[p]]);
+ printf("Type mismatch(%u): detecting %s, expecting %s!\n", tag, typeNames[typeNumber], typeNames[shadow_begin[p]]);
return;
} else {
/* If so, set type to the type being read.
Check that none of the bytes are typed.*/
for (; i < size; ++i) {
if (0xFF != shadow_begin[p + i]) {
- printf("Type mismatch: detecting %u, expecting %u (0 != %u)! %u\n", typeNumber, shadow_begin[p+i], shadow_begin[p + i], tag);
+ printf("Type alignment mismatch(%u): detecting %s, expecting %s!\n", tag, typeNames[typeNumber], typeNames[shadow_begin[p+i]]);
break;
}
}
@@ -170,7 +170,7 @@
for (; i < size; ++i) {
if (0 != shadow_begin[p + i]) {
- printf("Type mismatch: detecting %u, expecting %u (0 != %u)!\n", typeNumber, shadow_begin[p], shadow_begin[p + i]);
+ printf("Type alignment mismatch(%u): detecting %s, expecting %s!\n", tag, typeNames[typeNumber], typeNames[shadow_begin[p]]);
break;
}
}
More information about the llvm-commits
mailing list