diff options
author | Zachary Turner <zturner@google.com> | 2016-07-22 15:46:37 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-07-22 15:46:37 +0000 |
commit | d218c261247edb8b44132fcff3588a67494effb6 (patch) | |
tree | a0f8928f13397f9e1491638ca3a040241e96f4d1 /llvm/lib/DebugInfo/PDB/Raw/ModInfo.cpp | |
parent | b772151a17a508355ad46db63d13da1dbec32b09 (diff) | |
download | llvm-d218c261247edb8b44132fcff3588a67494effb6.zip llvm-d218c261247edb8b44132fcff3588a67494effb6.tar.gz llvm-d218c261247edb8b44132fcff3588a67494effb6.tar.bz2 |
[pdb] Round-trip module & file info to/from YAML.
This implements support for writing compiland and compiland source
file info to a binary PDB. This is tested by adding support for
dumping these fields from an existing PDB to yaml, reading them
back in, and dumping them again and verifying the values are as
expected.
llvm-svn: 276426
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/ModInfo.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/ModInfo.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/ModInfo.cpp b/llvm/lib/DebugInfo/PDB/Raw/ModInfo.cpp index bae135f..538fe22 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/ModInfo.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/ModInfo.cpp @@ -17,55 +17,6 @@ using namespace llvm; using namespace llvm::pdb; using namespace llvm::support; -namespace { - -struct SCBytes { - ulittle16_t Section; - char Padding1[2]; - little32_t Offset; - little32_t Size; - ulittle32_t Characteristics; - ulittle16_t ModuleIndex; - char Padding2[2]; - ulittle32_t DataCrc; - ulittle32_t RelocCrc; -}; - -// struct Flags { -// uint16_t fWritten : 1; // True if ModInfo is dirty -// uint16_t fECEnabled : 1; // Is EC symbolic info present? (What is EC?) -// uint16_t unused : 6; // Reserved -// uint16_t iTSM : 8; // Type Server Index for this module -//}; -const uint16_t HasECFlagMask = 0x2; - -const uint16_t TypeServerIndexMask = 0xFF00; -const uint16_t TypeServerIndexShift = 8; -} - -struct ModInfo::FileLayout { - ulittle32_t Mod; // Currently opened module. This field is a - // pointer in the reference implementation, but - // that won't work on 64-bit systems, and anyway - // it doesn't make sense to read a pointer from a - // file. For now it is unused, so just ignore it. - SCBytes SC; // First section contribution of this module. - ulittle16_t Flags; // See Flags definition. - ulittle16_t ModDiStream; // Stream Number of module debug info - ulittle32_t SymBytes; // Size of local symbol debug info in above stream - ulittle32_t LineBytes; // Size of line number debug info in above stream - ulittle32_t C13Bytes; // Size of C13 line number info in above stream - ulittle16_t NumFiles; // Number of files contributing to this module - char Padding1[2]; // Padding so the next field is 4-byte aligned. - ulittle32_t FileNameOffs; // array of [0..NumFiles) DBI name buffer offsets. - // This field is a pointer in the reference - // implementation, but as with `Mod`, we ignore it - // for now since it is unused. - ulittle32_t SrcFileNameNI; // Name Index for src file name - ulittle32_t PdbFilePathNI; // Name Index for path to compiler PDB - // Null terminated Module name - // Null terminated Obj File Name -}; ModInfo::ModInfo() : Layout(nullptr) {} |