[llvm] r218502 - llvm-vtabledump: strip trailing NUL bytes
David Majnemer
david.majnemer at gmail.com
Thu Sep 25 22:50:48 PDT 2014
Author: majnemer
Date: Fri Sep 26 00:50:45 2014
New Revision: 218502
URL: http://llvm.org/viewvc/llvm-project?rev=218502&view=rev
Log:
llvm-vtabledump: strip trailing NUL bytes
Modified:
llvm/trunk/test/tools/llvm-vtabledump/trivial.test
llvm/trunk/tools/llvm-vtabledump/llvm-vtabledump.cpp
Modified: llvm/trunk/test/tools/llvm-vtabledump/trivial.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-vtabledump/trivial.test?rev=218502&r1=218501&r2=218502&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-vtabledump/trivial.test (original)
+++ llvm/trunk/test/tools/llvm-vtabledump/trivial.test Fri Sep 26 00:50:45 2014
@@ -44,7 +44,7 @@ CHECK-NEXT: ??_R1A@?0A at EA@S@@8[Flags]: 6
CHECK-NEXT: ??_R1A@?0A at EA@S@@8[ClassHierarchyDescriptor]: ??_R3S@@8
CHECK-NEXT: ??_R0?AUA@@@8[VFPtr]: ??_7type_info@@6B@
CHECK-NEXT: ??_R0?AUA@@@8[AlwaysZero]: 0
-CHECK-NEXT: ??_R0?AUA@@@8[MangledName]: .?AUA@@\x00
+CHECK-NEXT: ??_R0?AUA@@@8[MangledName]: .?AUA@@
CHECK-NEXT: ??_R0?AUS@@@8[VFPtr]: ??_7type_info@@6B@
CHECK-NEXT: ??_R0?AUS@@@8[AlwaysZero]: 0
-CHECK-NEXT: ??_R0?AUS@@@8[MangledName]: .?AUS@@\x00
+CHECK-NEXT: ??_R0?AUS@@@8[MangledName]: .?AUS@@
Modified: llvm/trunk/tools/llvm-vtabledump/llvm-vtabledump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-vtabledump/llvm-vtabledump.cpp?rev=218502&r1=218501&r2=218502&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-vtabledump/llvm-vtabledump.cpp (original)
+++ llvm/trunk/tools/llvm-vtabledump/llvm-vtabledump.cpp Fri Sep 26 00:50:45 2014
@@ -303,7 +303,9 @@ static void dumpVTables(const ObjectFile
AlwaysZero |= Data;
outs() << TDName << "[AlwaysZero]: " << AlwaysZero << '\n';
outs() << TDName << "[MangledName]: ";
- outs().write_escaped(TD.MangledName, /*UseHexEscapes=*/true) << '\n';
+ outs().write_escaped(TD.MangledName.rtrim(StringRef("\0", 1)),
+ /*UseHexEscapes=*/true)
+ << '\n';
}
}
More information about the llvm-commits
mailing list