From ffbe87eba27b8828d7572fcc5f06033c7bb8b7f6 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 10 Jan 2013 22:39:40 +0000 Subject: [PATCH] UBSan: use %p not 0x%zx when printing pointers. llvm-svn: 172129 --- compiler-rt/lib/ubsan/ubsan_diag.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/ubsan/ubsan_diag.cc b/compiler-rt/lib/ubsan/ubsan_diag.cc index 8a31494a4953..57c98e669e90 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(":"); @@ -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; } }