llvm/lib/DebugInfo/PDB
Zachary Turner 64cc1b2eb3 Refactor the PDB Stream reading interface.
The motivation for this change is that PDB has the notion of
streams and substreams.  Substreams often consist of variable
length structures that are convenient to be able to treat as
guaranteed, contiguous byte arrays, whereas the streams they
are contained in are not necessarily so, as a single stream
could be spread across many discontiguous blocks.

So, when processing data from a substream, we want to be able
to assume that we have a contiguous byte array so that we can
cast pointers to variable length arrays and such.

This leads to the question of how to be able to read the same
data structure from either a stream or a substream using the
same interface, which is where this patch comes in.

We separate out the stream's read state from the underlying
representation, and introduce a `StreamReader` class.  Then
we change the name of `PDBStream` to `MappedBlockStream`, and
introduce a second kind of stream called a `ByteStream` which is
simply a sequence of contiguous bytes.  Finally, we update all
of the std::vectors in `PDBDbiStream` to use `ByteStream` instead
as a proof of concept.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 17:22:58 +00:00
..
DIA [llvm-pdbdump] Print a better error message when PDB loading fails. 2016-04-19 17:36:58 +00:00
Raw Refactor the PDB Stream reading interface. 2016-04-29 17:22:58 +00:00
CMakeLists.txt Refactor the PDB Stream reading interface. 2016-04-29 17:22:58 +00:00
IPDBSourceFile.cpp
LLVMBuild.txt
PDB.cpp Resubmit "Refactor raw pdb dumper into library" 2016-04-25 17:38:08 +00:00
PDBContext.cpp [PDB] Fix function names for private symbols in PDBs 2016-04-27 16:10:29 +00:00
PDBExtras.cpp Parse and dump PDB DBI Stream Header Information 2016-04-26 18:42:34 +00:00
PDBInterfaceAnchors.cpp
PDBSymbol.cpp [DebugInfoPDB] Raise getSymIndexId() up to PDBSymbol 2016-02-17 21:13:34 +00:00
PDBSymbolAnnotation.cpp
PDBSymbolBlock.cpp
PDBSymbolCompiland.cpp [DebugInfoPDB] Add source / line number accessors for PDB. 2016-02-18 18:47:29 +00:00
PDBSymbolCompilandDetails.cpp
PDBSymbolCompilandEnv.cpp [DebugInfoPDB] A few cleanups on PDB Variant class. 2016-02-17 22:46:33 +00:00
PDBSymbolCustom.cpp MC: MCCodeGenInfo naming update. NFC. 2015-05-15 19:13:31 +00:00
PDBSymbolData.cpp MC: MCCodeGenInfo naming update. NFC. 2015-05-15 19:13:31 +00:00
PDBSymbolExe.cpp
PDBSymbolFunc.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PDBSymbolFuncDebugEnd.cpp
PDBSymbolFuncDebugStart.cpp
PDBSymbolLabel.cpp
PDBSymbolPublicSymbol.cpp
PDBSymbolThunk.cpp
PDBSymbolTypeArray.cpp
PDBSymbolTypeBaseClass.cpp
PDBSymbolTypeBuiltin.cpp
PDBSymbolTypeCustom.cpp
PDBSymbolTypeDimension.cpp
PDBSymbolTypeEnum.cpp
PDBSymbolTypeFriend.cpp
PDBSymbolTypeFunctionArg.cpp
PDBSymbolTypeFunctionSig.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PDBSymbolTypeManaged.cpp
PDBSymbolTypePointer.cpp
PDBSymbolTypeTypedef.cpp
PDBSymbolTypeUDT.cpp
PDBSymbolTypeVTable.cpp
PDBSymbolTypeVTableShape.cpp
PDBSymbolUnknown.cpp
PDBSymbolUsingNamespace.cpp
PDBSymDumper.cpp