Added printPointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vikram S. Adve 2001-10-28 21:34:59 +00:00
parent 1b20ca21c6
commit 5b3a0140a7

View File

@ -67,6 +67,12 @@ printDouble(double d)
printf("%g", d);
}
void
printPointer(void* p)
{
printf("0x%x", p);
}
#undef TEST_RUNTIME
#ifdef TEST_RUNTIME
int
@ -76,15 +82,17 @@ main(int argc, char** argv)
printString("argc = ");
printLong(argc);
printString(" = (as float) ");
printFloat(argc);
printFloat(argc * 1.0);
printString(" = (as double) ");
printDouble(argc);
printDouble(argc * 1.0);
for (i=0; i < argc; i++)
{
printString("\nargv[");
printLong(i);
printString("] = ");
printString(argv[i]);
printString("\t@ ");
printPointer(argv[i]);
}
printString("\n");
}