Skip to content

Commit

Permalink
llvm-vtabledump: Handle Itanium VTables
Browse files Browse the repository at this point in the history
Add support in the vtable dumper for the Itanium ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221133 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
majnemer committed Nov 3, 2014
1 parent 9808f11 commit 5dc81d5
Show file tree
Hide file tree
Showing 2 changed files with 222 additions and 95 deletions.
104 changes: 56 additions & 48 deletions test/tools/llvm-vtabledump/trivial.test
Original file line number Diff line number Diff line change
@@ -1,50 +1,58 @@
RUN: llvm-vtabledump %p/Inputs/trivial.obj.coff-i386 \
RUN: | FileCheck %s
RUN: | FileCheck %s --check-prefix=COFF-I386

CHECK: ??_7S@@6B@[0]: ??_R4S@@6B@
CHECK-NEXT: ??_7S@@6B@[4]: ??_GS@@UAEPAXI@Z
CHECK-NEXT: ??_8S@@7B@[0]: -4
CHECK-NEXT: ??_8S@@7B@[4]: 4
CHECK-NEXT: ??_R4S@@6B@[IsImageRelative]: 0
CHECK-NEXT: ??_R4S@@6B@[OffsetToTop]: 0
CHECK-NEXT: ??_R4S@@6B@[VFPtrOffset]: 0
CHECK-NEXT: ??_R4S@@6B@[TypeDescriptor]: ??_R0?AUS@@@8
CHECK-NEXT: ??_R4S@@6B@[ClassHierarchyDescriptor]: ??_R3S@@8
CHECK-NEXT: ??_R3A@@8[AlwaysZero]: 0
CHECK-NEXT: ??_R3A@@8[Flags]: 0
CHECK-NEXT: ??_R3A@@8[NumClasses]: 1
CHECK-NEXT: ??_R3A@@8[BaseClassArray]: ??_R2A@@8
CHECK-NEXT: ??_R3S@@8[AlwaysZero]: 0
CHECK-NEXT: ??_R3S@@8[Flags]: 0
CHECK-NEXT: ??_R3S@@8[NumClasses]: 2
CHECK-NEXT: ??_R3S@@8[BaseClassArray]: ??_R2S@@8
CHECK-NEXT: ??_R2A@@8[0]: ??_R1A@?0A@EA@A@@8
CHECK-NEXT: ??_R2S@@8[0]: ??_R1A@?0A@EA@S@@8
CHECK-NEXT: ??_R2S@@8[4]: ??_R1A@33FA@A@@8
CHECK-NEXT: ??_R1A@33FA@A@@8[TypeDescriptor]: ??_R0?AUA@@@8
CHECK-NEXT: ??_R1A@33FA@A@@8[NumBases]: 0
CHECK-NEXT: ??_R1A@33FA@A@@8[OffsetInVBase]: 0
CHECK-NEXT: ??_R1A@33FA@A@@8[VBPtrOffset]: 4
CHECK-NEXT: ??_R1A@33FA@A@@8[OffsetInVBTable]: 4
CHECK-NEXT: ??_R1A@33FA@A@@8[Flags]: 80
CHECK-NEXT: ??_R1A@33FA@A@@8[ClassHierarchyDescriptor]: ??_R3A@@8
CHECK-NEXT: ??_R1A@?0A@EA@A@@8[TypeDescriptor]: ??_R0?AUA@@@8
CHECK-NEXT: ??_R1A@?0A@EA@A@@8[NumBases]: 0
CHECK-NEXT: ??_R1A@?0A@EA@A@@8[OffsetInVBase]: 0
CHECK-NEXT: ??_R1A@?0A@EA@A@@8[VBPtrOffset]: -1
CHECK-NEXT: ??_R1A@?0A@EA@A@@8[OffsetInVBTable]: 0
CHECK-NEXT: ??_R1A@?0A@EA@A@@8[Flags]: 64
CHECK-NEXT: ??_R1A@?0A@EA@A@@8[ClassHierarchyDescriptor]: ??_R3A@@8
CHECK-NEXT: ??_R1A@?0A@EA@S@@8[TypeDescriptor]: ??_R0?AUS@@@8
CHECK-NEXT: ??_R1A@?0A@EA@S@@8[NumBases]: 1
CHECK-NEXT: ??_R1A@?0A@EA@S@@8[OffsetInVBase]: 0
CHECK-NEXT: ??_R1A@?0A@EA@S@@8[VBPtrOffset]: -1
CHECK-NEXT: ??_R1A@?0A@EA@S@@8[OffsetInVBTable]: 0
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@@
CHECK-NEXT: ??_R0?AUS@@@8[VFPtr]: ??_7type_info@@6B@
CHECK-NEXT: ??_R0?AUS@@@8[AlwaysZero]: 0
CHECK-NEXT: ??_R0?AUS@@@8[MangledName]: .?AUS@@
RUN: llvm-vtabledump %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s --check-prefix=ELF-I386

COFF-I386: ??_7S@@6B@[0]: ??_R4S@@6B@
COFF-I386-NEXT: ??_7S@@6B@[4]: ??_GS@@UAEPAXI@Z
COFF-I386-NEXT: ??_8S@@7B@[0]: -4
COFF-I386-NEXT: ??_8S@@7B@[4]: 4
COFF-I386-NEXT: ??_R4S@@6B@[IsImageRelative]: 0
COFF-I386-NEXT: ??_R4S@@6B@[OffsetToTop]: 0
COFF-I386-NEXT: ??_R4S@@6B@[VFPtrOffset]: 0
COFF-I386-NEXT: ??_R4S@@6B@[TypeDescriptor]: ??_R0?AUS@@@8
COFF-I386-NEXT: ??_R4S@@6B@[ClassHierarchyDescriptor]: ??_R3S@@8
COFF-I386-NEXT: ??_R3A@@8[AlwaysZero]: 0
COFF-I386-NEXT: ??_R3A@@8[Flags]: 0
COFF-I386-NEXT: ??_R3A@@8[NumClasses]: 1
COFF-I386-NEXT: ??_R3A@@8[BaseClassArray]: ??_R2A@@8
COFF-I386-NEXT: ??_R3S@@8[AlwaysZero]: 0
COFF-I386-NEXT: ??_R3S@@8[Flags]: 0
COFF-I386-NEXT: ??_R3S@@8[NumClasses]: 2
COFF-I386-NEXT: ??_R3S@@8[BaseClassArray]: ??_R2S@@8
COFF-I386-NEXT: ??_R2A@@8[0]: ??_R1A@?0A@EA@A@@8
COFF-I386-NEXT: ??_R2S@@8[0]: ??_R1A@?0A@EA@S@@8
COFF-I386-NEXT: ??_R2S@@8[4]: ??_R1A@33FA@A@@8
COFF-I386-NEXT: ??_R1A@33FA@A@@8[TypeDescriptor]: ??_R0?AUA@@@8
COFF-I386-NEXT: ??_R1A@33FA@A@@8[NumBases]: 0
COFF-I386-NEXT: ??_R1A@33FA@A@@8[OffsetInVBase]: 0
COFF-I386-NEXT: ??_R1A@33FA@A@@8[VBPtrOffset]: 4
COFF-I386-NEXT: ??_R1A@33FA@A@@8[OffsetInVBTable]: 4
COFF-I386-NEXT: ??_R1A@33FA@A@@8[Flags]: 80
COFF-I386-NEXT: ??_R1A@33FA@A@@8[ClassHierarchyDescriptor]: ??_R3A@@8
COFF-I386-NEXT: ??_R1A@?0A@EA@A@@8[TypeDescriptor]: ??_R0?AUA@@@8
COFF-I386-NEXT: ??_R1A@?0A@EA@A@@8[NumBases]: 0
COFF-I386-NEXT: ??_R1A@?0A@EA@A@@8[OffsetInVBase]: 0
COFF-I386-NEXT: ??_R1A@?0A@EA@A@@8[VBPtrOffset]: -1
COFF-I386-NEXT: ??_R1A@?0A@EA@A@@8[OffsetInVBTable]: 0
COFF-I386-NEXT: ??_R1A@?0A@EA@A@@8[Flags]: 64
COFF-I386-NEXT: ??_R1A@?0A@EA@A@@8[ClassHierarchyDescriptor]: ??_R3A@@8
COFF-I386-NEXT: ??_R1A@?0A@EA@S@@8[TypeDescriptor]: ??_R0?AUS@@@8
COFF-I386-NEXT: ??_R1A@?0A@EA@S@@8[NumBases]: 1
COFF-I386-NEXT: ??_R1A@?0A@EA@S@@8[OffsetInVBase]: 0
COFF-I386-NEXT: ??_R1A@?0A@EA@S@@8[VBPtrOffset]: -1
COFF-I386-NEXT: ??_R1A@?0A@EA@S@@8[OffsetInVBTable]: 0
COFF-I386-NEXT: ??_R1A@?0A@EA@S@@8[Flags]: 64
COFF-I386-NEXT: ??_R1A@?0A@EA@S@@8[ClassHierarchyDescriptor]: ??_R3S@@8
COFF-I386-NEXT: ??_R0?AUA@@@8[VFPtr]: ??_7type_info@@6B@
COFF-I386-NEXT: ??_R0?AUA@@@8[AlwaysZero]: 0
COFF-I386-NEXT: ??_R0?AUA@@@8[MangledName]: .?AUA@@
COFF-I386-NEXT: ??_R0?AUS@@@8[VFPtr]: ??_7type_info@@6B@
COFF-I386-NEXT: ??_R0?AUS@@@8[AlwaysZero]: 0
COFF-I386-NEXT: ??_R0?AUS@@@8[MangledName]: .?AUS@@

ELF-I386: _ZTS1A: 1A
ELF-I386-NEXT: _ZTV1A[0]: 0
ELF-I386-NEXT: _ZTV1A[4]: _ZTI1A
ELF-I386-NEXT: _ZTV1A[8]: _ZN1A1fEv
Loading

0 comments on commit 5dc81d5

Please sign in to comment.