1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

pdbdump: fix bug in name hash table.

name_ids() did not return all IDs but only the first NameCount items.
The number of non-zero entries in IDs vector is NameCount, but it
does not mean that all non-zero entries are at the beginning of IDs
vector.

Differential Revision: http://reviews.llvm.org/D20611

llvm-svn: 270656
This commit is contained in:
Rui Ueyama 2016-05-25 04:07:17 +00:00
parent 2984a1ea1d
commit 9930c53d56
2 changed files with 44 additions and 17 deletions

View File

@ -147,6 +147,4 @@ uint32_t NameHashTable::getIDForString(StringRef Str) const {
return IDs[0];
}
ArrayRef<uint32_t> NameHashTable::name_ids() const {
return ArrayRef<uint32_t>(IDs).slice(1, NameCount);
}
ArrayRef<uint32_t> NameHashTable::name_ids() const { return IDs; }

View File

@ -50,6 +50,7 @@
; EMPTY-NEXT: Names [
; EMPTY-NEXT: d:\src\llvm\test\debuginfo\pdb\inputs\predefined c++ attributes (compiler internal)
; EMPTY-NEXT: d:\src\llvm\test\debuginfo\pdb\inputs\empty.cpp
; EMPTY-NEXT: $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + =
; EMPTY-NEXT: ]
; EMPTY-NEXT: }
; EMPTY-NEXT: Type Info Stream {
@ -584,6 +585,34 @@
; BIG-NEXT: $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $20 $T0 28 - ^ = $23 $T0 32 - ^ = $24 $T0 36 - ^ =
; BIG-NEXT: f:\dd\vctools\crt\vcruntime\inc\i386\xmmintrin.h
; BIG-NEXT: f:\dd\vctools\crt\vcruntime\inc\rtcapi.h
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\defaults\denormal_control.cpp
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\gs\gs_report.c
; BIG-NEXT: f:\dd\externalapis\windows\8.1\sdk\inc\minwindef.h
; BIG-NEXT: f:\dd\vctools\crt\vcruntime\inc\vadefs.h
; BIG-NEXT: _TP_CALLBACK_ENVIRON_V3
; BIG-NEXT: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $23 $T0 4 - ^ = $24 $T0 8 - ^ =
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\inc\vcstartup_internal.h
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\rtc\initsect.cpp
; BIG-NEXT: f:\dd\externalapis\unifiedcrt\inc\ctype.h
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\utility\matherr_detection.c
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\defaults\invalid_parameter_handler.cpp
; BIG-NEXT: f:\dd\externalapis\windows\8.1\sdk\inc\basetsd.h
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\eh\i386\chandler4gs.c
; BIG-NEXT: f:\dd\vctools\langapi\include\ehdata.h
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\defaults\file_mode.cpp
; BIG-NEXT: f:\dd\externalapis\unifiedcrt\inc\math.h
; BIG-NEXT: f:\dd\externalapis\windows\8.1\sdk\inc\winuser.h
; BIG-NEXT: $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $20 $T0 48 - ^ = $23 $T0 52 - ^ =
; BIG-NEXT: $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $20 $T0 48 - ^ = $23 $T0 52 - ^ = $24 $T0 56 - ^ =
; BIG-NEXT: f:\dd\externalapis\unifiedcrt\inc\stdlib.h
; BIG-NEXT: f:\dd\vctools\crt\vcstartup\src\defaults\default_local_stdio_options.cpp
; BIG-NEXT: f:\dd\externalapis\windows\8.1\sdk\inc\stralign.h
; BIG-NEXT: f:\dd\externalapis\unifiedcrt\inc\malloc.h
; BIG-NEXT: f:\dd\externalapis\windows\8.1\sdk\inc\winerror.h
; BIG-NEXT: $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $20 $T0 4 - ^ =
; BIG-NEXT: $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $20 $T0 48 - ^ =
; BIG-NEXT: $T0 $ebp = $eip $T0 4 + ^ = $ebp $T0 ^ = $esp $T0 8 + = $23 $T0 16 - ^ =
; BIG-NEXT: f:\dd\externalapis\unifiedcrt\inc\corecrt_memory.h
; BIG-NEXT: ]
; BIG-NEXT: }
; BIG-NEXT: DBI Stream {