summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-10 22:39:40 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-10 22:39:40 +0000
commitffbe87eba27b8828d7572fcc5f06033c7bb8b7f6 (patch)
treea70171d56c7664f00867856d94022d2bd814c643
parentf7d65c43d0f059ba22113cb337cf17e7d7529102 (diff)
downloadbcm5719-llvm-ffbe87eba27b8828d7572fcc5f06033c7bb8b7f6.tar.gz
bcm5719-llvm-ffbe87eba27b8828d7572fcc5f06033c7bb8b7f6.zip
UBSan: use %p not 0x%zx when printing pointers.
llvm-svn: 172129
-rw-r--r--compiler-rt/lib/ubsan/ubsan_diag.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/ubsan/ubsan_diag.cc b/compiler-rt/lib/ubsan/ubsan_diag.cc
index 8a31494a495..57c98e669e9 100644
--- a/compiler-rt/lib/ubsan/ubsan_diag.cc
+++ b/compiler-rt/lib/ubsan/ubsan_diag.cc
@@ -83,7 +83,7 @@ static void renderLocation(Location Loc) {
Loc.getModuleLocation().getOffset());
break;
case Location::LK_Memory:
- Printf("0x%zx:", Loc.getMemoryLocation());
+ Printf("%p:", Loc.getMemoryLocation());
break;
case Location::LK_Null:
RawWrite("<unknown>:");
@@ -135,7 +135,7 @@ static void renderText(const char *Message, const Diag::Arg *Args) {
break;
}
case Diag::AK_Pointer:
- Printf("0x%zx", (uptr)A.Pointer);
+ Printf("%p", A.Pointer);
break;
}
}
OpenPOWER on IntegriCloud