teak-llvm/llvm/lib/DebugInfo/CodeView
Zachary Turner ad859bd472 [CodeView] Fix random access of type names.
Suppose we had a type index offsets array with a boundary at type index
N. Then you request the name of the type with index N+1, and that name
requires the name of index N-1 (think a parameter list, for example). We
didn't handle this, and we would print something like (<unknown UDT>,
<unknown UDT>).

The fix for this is not entirely trivial, and speaks to a larger
problem. I think we need to kill TypeDatabase, or at the very least kill
TypeDatabaseVisitor. We need a thing that doesn't do any caching
whatsoever, just given a type index it can compute the type name "the
slow way". The reason for the bug is that we don't have anything like
that. Everything goes through the type database, and if we've visited a
record, then we're "done". It doesn't know how to do the expensive thing
of re-visiting dependent records if they've not yet been visited.

What I've done here is more or less copied the code (albeit greatly
simplified) from TypeDatabaseVisitor, but wrapped it in an interface
that just returns a std::string. The logic of caching the name is now in
LazyRandomTypeCollection. Eventually I'd like to move the record
database here as well and the visited record bitfield here as well, at
which point we can actually just delete TypeDatabase. I don't see any
reason for it if a "sequential" collection is just a special case of a
random access collection with an empty partial offsets array.

Differential Revision: https://reviews.llvm.org/D34297

llvm-svn: 305612
2017-06-16 23:42:44 +00:00
..
CMakeLists.txt [CodeView] Fix random access of type names. 2017-06-16 23:42:44 +00:00
CodeViewError.cpp [pdb] Add the ability to resolve TypeServer PDBs. 2017-02-16 23:35:45 +00:00
CodeViewRecordIO.cpp [CodeView] Properly align symbol records on read/write. 2017-06-01 21:52:41 +00:00
CVSymbolVisitor.cpp [CodeView] Move CodeView YAML code to ObjectYAML. 2017-05-30 21:53:05 +00:00
CVTypeVisitor.cpp Remove some dead code / includes. 2017-06-16 23:42:15 +00:00
DebugChecksumsSubsection.cpp Allow VarStreamArray to use stateful extractors. 2017-06-09 17:54:36 +00:00
DebugCrossExSubsection.cpp [CodeView] Fix endianness bug. 2017-06-05 22:12:23 +00:00
DebugCrossImpSubsection.cpp Allow VarStreamArray to use stateful extractors. 2017-06-09 17:54:36 +00:00
DebugFrameDataSubsection.cpp [CodeView] Add more DebugSubsection implementations. 2017-05-30 17:13:33 +00:00
DebugInlineeLinesSubsection.cpp Allow VarStreamArray to use stateful extractors. 2017-06-09 17:54:36 +00:00
DebugLinesSubsection.cpp Allow VarStreamArray to use stateful extractors. 2017-06-09 17:54:36 +00:00
DebugStringTableSubsection.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
DebugSubsection.cpp [CodeView] Rename ModuleDebugFragment -> DebugSubsection. 2017-05-30 16:36:15 +00:00
DebugSubsectionRecord.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
DebugSubsectionVisitor.cpp Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..." 2017-06-14 15:59:27 +00:00
DebugSymbolRVASubsection.cpp [pdb] Support CoffSymbolRVA debug subsection. 2017-06-09 20:46:52 +00:00
DebugSymbolsSubsection.cpp [CodeView] Add more DebugSubsection implementations. 2017-05-30 17:13:33 +00:00
EnumTables.cpp [CodeView] Move CodeView YAML code to ObjectYAML. 2017-05-30 21:53:05 +00:00
Formatters.cpp Properly parse the TypeServer2 record. 2017-02-03 21:22:27 +00:00
LazyRandomTypeCollection.cpp [CodeView] Fix random access of type names. 2017-06-16 23:42:44 +00:00
Line.cpp
LLVMBuild.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
RecordSerialization.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
StringsAndChecksums.cpp [llvm-pdbutil] Add support for dumping lines and inlinee lines. 2017-06-15 23:56:19 +00:00
SymbolDumper.cpp Resubmit "[llvm-pdbutil] rewrite the "raw" output style." 2017-06-15 22:24:24 +00:00
SymbolRecordMapping.cpp Resubmit "[llvm-pdbutil] rewrite the "raw" output style." 2017-06-15 22:24:24 +00:00
SymbolSerializer.cpp [CodeView] Properly align symbol records on read/write. 2017-06-01 21:52:41 +00:00
TypeDatabase.cpp Resubmit "[llvm-pdbutil] rewrite the "raw" output style." 2017-06-15 22:24:24 +00:00
TypeDatabaseVisitor.cpp [CodeView] Add a random access type visitor. 2017-05-12 19:18:12 +00:00
TypeDumpVisitor.cpp Remove some dead code / includes. 2017-06-16 23:42:15 +00:00
TypeIndex.cpp Resubmit "[llvm-pdbutil] rewrite the "raw" output style." 2017-06-15 22:24:24 +00:00
TypeIndexDiscovery.cpp Same expressions on both sides of the return 2017-06-12 18:53:46 +00:00
TypeName.cpp [CodeView] Fix random access of type names. 2017-06-16 23:42:44 +00:00
TypeRecordMapping.cpp [codeview] Add support for label type records 2017-04-03 21:25:20 +00:00
TypeSerializer.cpp [CodeView Type Merging] Don't keep re-allocating temp serializer. 2017-05-25 21:15:37 +00:00
TypeStreamMerger.cpp Remove unused member. 2017-05-25 23:47:56 +00:00
TypeTableCollection.cpp Allow VarStreamArray to use stateful extractors. 2017-06-09 17:54:36 +00:00