1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

llvm-vtabledump: strip trailing NUL bytes

llvm-svn: 218502
This commit is contained in:
David Majnemer 2014-09-26 05:50:45 +00:00
parent 2bce899754
commit e51e7a3fa8
2 changed files with 5 additions and 3 deletions

View File

@ -44,7 +44,7 @@ CHECK-NEXT: ??_R1A@?0A@EA@S@@8[Flags]: 64
CHECK-NEXT: ??_R1A@?0A@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@@

View File

@ -303,7 +303,9 @@ static void dumpVTables(const ObjectFile *Obj) {
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';
}
}