llvm-project/llvm/lib/DebugInfo/PDB/Native
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
..
DbiModuleDescriptor.cpp [llvm-pdbutil] Dump first section contribution for each module. 2018-04-17 20:06:43 +00:00
DbiModuleDescriptorBuilder.cpp [LLD/PDB] Emit first section contribution for DBI Module Descriptor. 2018-04-20 18:00:46 +00:00
DbiModuleList.cpp [CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-06-30 23:06:03 +00:00
DbiStream.cpp [PDB] Add the ability to lookup global symbols by name. 2018-10-08 04:19:16 +00:00
DbiStreamBuilder.cpp [PDB] Emit old fpo data to the PDB file. 2018-09-12 21:02:01 +00:00
EnumTables.cpp
GSIStreamBuilder.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
GlobalsStream.cpp [PDB] Fix another bug in globals stream name lookup. 2018-10-09 21:19:03 +00:00
Hash.cpp [CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-06-30 23:06:03 +00:00
HashTable.cpp [PDB] Fix a bug where we were serializing hash tables incorrectly. 2018-03-15 22:31:00 +00:00
InfoStream.cpp [llvm-pdbutil] Add the ability to explain binary files. 2018-04-04 17:29:09 +00:00
InfoStreamBuilder.cpp Give InfoStreamBuilder an opt-in method to write a hash of the PDB as GUID. 2018-09-15 18:35:51 +00:00
ModuleDebugStream.cpp [PDB] Add the ability to lookup global symbols by name. 2018-10-08 04:19:16 +00:00
NamedStreamMap.cpp [PDB] Make our PDBs look more like MS PDBs. 2018-03-23 18:43:39 +00:00
NativeCompilandSymbol.cpp [PDB] Better support for enumerating pointer types. 2018-09-18 16:35:05 +00:00
NativeEnumGlobals.cpp [PDB] Add support for dumping Typedef records. 2018-10-01 17:55:38 +00:00
NativeEnumModules.cpp [PDB] Remove all clone() methods. 2018-09-12 22:57:03 +00:00
NativeEnumTypes.cpp [NativePDB] Add support for reading function signatures. 2018-09-21 22:36:28 +00:00
NativeExeSymbol.cpp [PDB] Add support for dumping Typedef records. 2018-10-01 17:55:38 +00:00
NativeRawSymbol.cpp [PDB] Add native reading support for UDT / class types. 2018-09-21 22:36:04 +00:00
NativeSession.cpp Revert "Revert "[PDB] Extend IPDBSession's interface to retrieve frame data"" 2018-10-23 08:14:53 +00:00
NativeSymbolEnumerator.cpp [PDB] Better support for enumerating pointer types. 2018-09-18 16:35:05 +00:00
NativeTypeArray.cpp [PDB] Add native support for dumping array types. 2018-09-30 16:19:18 +00:00
NativeTypeBuiltin.cpp [NativePDB] Add support for reading function signatures. 2018-09-21 22:36:28 +00:00
NativeTypeEnum.cpp [PDB] Add native reading support for UDT / class types. 2018-09-21 22:36:04 +00:00
NativeTypeFunctionSig.cpp [PDB] Add support for parsing VFTable Shape records. 2018-10-01 17:55:16 +00:00
NativeTypePointer.cpp [PDB] Better native API support for pointers. 2018-09-29 23:28:19 +00:00
NativeTypeTypedef.cpp [PDB] Add support for dumping Typedef records. 2018-10-01 17:55:38 +00:00
NativeTypeUDT.cpp [PDB] Add native reading support for UDT / class types. 2018-09-21 22:36:04 +00:00
NativeTypeVTShape.cpp [PDB] Add support for parsing VFTable Shape records. 2018-10-01 17:55:16 +00:00
PDBFile.cpp [DebugInfo] Common behavior for error types 2018-08-31 17:41:58 +00:00
PDBFileBuilder.cpp Give InfoStreamBuilder an opt-in method to write a hash of the PDB as GUID. 2018-09-15 18:35:51 +00:00
PDBStringTable.cpp [PDB] Don't ignore bucket 0 when writing the PDB string table. 2018-03-21 22:23:59 +00:00
PDBStringTableBuilder.cpp [PDB] Resubmit "Support embedding natvis files in PDBs." 2018-03-23 19:57:25 +00:00
PublicsStream.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
RawError.cpp [DebugInfo] Common behavior for error types 2018-08-31 17:41:58 +00:00
SymbolCache.cpp [PDB] Add support for dumping Typedef records. 2018-10-01 17:55:38 +00:00
SymbolStream.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
TpiHashing.cpp [PDB] Add the ability to map forward references to full decls. 2018-09-20 15:50:13 +00:00
TpiStream.cpp [NativePDB] Improved support for nested type reconstruction. 2018-11-13 20:07:32 +00:00
TpiStreamBuilder.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00