llvm-project/llvm/lib/DebugInfo/CodeView
Zachary Turner 03a24052f3 [NativePDB] Improved support for nested type reconstruction.
In a previous patch, we pre-processed the TPI stream in order to build
the reverse mapping from nested type -> parent type so that we could
accurately reconstruct a DeclContext hierarchy.

However, there were some issues. An LF_NESTTYPE record is really just a
typedef, so although it happens to be used to indicate the name of the
nested type and referring to the global record which defines the type,
it is also used for every other kind of nested typedef. When we rebuild
the DeclContext hierarchy, we want it to be as accurate as possible,
which means that if we have something like:

  struct A {
    struct B {};
    using C = B;
  };

We don't want to create two CXXRecordDecls in the AST each with the
exact same definition. We just want to create one for B and then
define C as an alias to B. Previously, however, it would not be able
to distinguish between the two cases and it would treat A::B and
A::C as being two classes each with separate definitions. We address
the first half of improving the pre-processing logic so that only
actual definitions are treated this way.

Later, in a followup patch, we can handle the case of nested
typedefs since we're already going to be enumerating the field list
anyway and this patch introduces the general framework for
distinguishing between the two cases.

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

llvm-svn: 346786
2018-11-13 20:07:32 +00:00
..
AppendingTypeTableBuilder.cpp Split TypeTableBuilder into two classes. 2017-11-30 18:39:50 +00:00
CMakeLists.txt [PDB] Add native reading support for UDT / class types. 2018-09-21 22:36:04 +00:00
CVSymbolVisitor.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
CVTypeVisitor.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
CodeViewError.cpp [COFF][LLD] Add link support for Microsoft precompiled headers OBJs 2018-11-05 19:20:47 +00:00
CodeViewRecordIO.cpp [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
ContinuationRecordBuilder.cpp Fix non assert build warnings. 2017-11-28 18:50:08 +00:00
DebugChecksumsSubsection.cpp [Codeview/PDB] Rename some methods for clarity. 2018-03-22 17:37:28 +00:00
DebugCrossExSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugCrossImpSubsection.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
DebugFrameDataSubsection.cpp [PDB] Write FPO Data to the PDB. 2018-09-11 22:35:01 +00:00
DebugInlineeLinesSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugLinesSubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugStringTableSubsection.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
DebugSubsection.cpp
DebugSubsectionRecord.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugSubsectionVisitor.cpp
DebugSymbolRVASubsection.cpp [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
DebugSymbolsSubsection.cpp
EnumTables.cpp [codeview] Decode and dump FP regs from S_FRAMEPROC records 2018-09-11 22:00:50 +00:00
Formatters.cpp [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
GlobalTypeTableBuilder.cpp [CodeView] Micro-optimizations to speed up type merging. 2018-01-30 17:12:04 +00:00
LLVMBuild.txt
LazyRandomTypeCollection.cpp [NativePDB] Improved support for nested type reconstruction. 2018-11-13 20:07:32 +00:00
Line.cpp
MergingTypeTableBuilder.cpp [CodeView] Add support for content hashing CodeView type records. 2017-12-05 23:08:58 +00:00
RecordName.cpp [CodeView] Minimal support for S_UNAMESPACE records 2018-07-31 19:15:50 +00:00
RecordSerialization.cpp [PDB] Improve GSI hash table dumping for publics and globals 2017-07-26 00:40:36 +00:00
SimpleTypeSerializer.cpp [CodeView] Refactor / Rewrite TypeSerializer and TypeTableBuilder. 2017-11-28 18:33:17 +00:00
StringsAndChecksums.cpp [llvm-pdbutil] Support dumping CodeView from object files. 2017-09-01 20:06:56 +00:00
SymbolDumper.cpp Fix a compilation failure on non-MSVC compilers. 2018-10-08 04:34:41 +00:00
SymbolRecordMapping.cpp [codeview] Add breaks to fix -Wimplicit-fallthrough 2018-11-01 19:36:29 +00:00
SymbolSerializer.cpp [PDB] Serialize records into a stack-allocated buffer. 2017-08-21 20:17:19 +00:00
TypeDumpVisitor.cpp Fix line endings (CR/LF -> LF) introduced by rL329613 2018-04-10 00:09:15 +00:00
TypeHashing.cpp Resubmit [pdb] Change /DEBUG:GHASH to emit 8 byte hashes." 2018-05-17 22:55:15 +00:00
TypeIndex.cpp [CodeView] Emit the correct TypeIndex for std::nullptr_t. 2018-11-01 04:02:41 +00:00
TypeIndexDiscovery.cpp [CodeView] Minimal support for S_UNAMESPACE records 2018-07-31 19:15:50 +00:00
TypeRecordHelpers.cpp [PDB] Add native reading support for UDT / class types. 2018-09-21 22:36:04 +00:00
TypeRecordMapping.cpp Fix line endings (CR/LF -> LF) introduced by rL329613 2018-04-10 00:09:15 +00:00
TypeStreamMerger.cpp [COFF][LLD] Add link support for Microsoft precompiled headers OBJs 2018-11-05 19:20:47 +00:00
TypeTableCollection.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00