This adds support for dumping the globals stream from PDB files using llvm-pdbdump, similar to the support we have for the publics stream.
Details
Diff Detail
- Build Status
Buildable 657 Build 657: arc lint + arc unit
Event Timeline
Overall looking good, a few nits.
include/llvm/DebugInfo/PDB/Raw/GlobalsStream.h | ||
---|---|---|
12 | nit: for include guards, CamelCase is usually converted to CAMEL_CASE, so s/GLOBALSSTREAM/GLOBALS_STREAM/ | |
19 | Remove this blank line. | |
28 | Ditto | |
lib/DebugInfo/PDB/Raw/GSI.cpp | ||
77–78 | If (auto EC = ...) | |
lib/DebugInfo/PDB/Raw/GSI.h | ||
19 | Nice comment! |
include/llvm/DebugInfo/PDB/Raw/GlobalsStream.h | ||
---|---|---|
30 | Can you mark this explicit | |
lib/DebugInfo/PDB/Raw/GlobalsStream.cpp | ||
33 | AFAICT this class seems almost identical to PublicsStream. Can we merge them and just have one class that handles both stream types? | |
lib/DebugInfo/PDB/Raw/PublicsStream.cpp | ||
27 | Headers should go under include/llvm/DebugInfo/PDB/Raw, and then this directive will need to be updated to show the whole path. |
lib/DebugInfo/PDB/Raw/GSI.h | ||
---|---|---|
19 | I knew you would like it. ;-) |
lib/DebugInfo/PDB/Raw/GlobalsStream.cpp | ||
---|---|---|
33 | There are some structures that are common to both, but the streams don't have the same format. In particular, the publics stream has another header at the front, and a couple of maps at the end that do not occur in the globals stream. I decided to give each stream type its own class, but factor out the functionality for parsing the common structures so that they can share it. Ok to keep it that way? | |
lib/DebugInfo/PDB/Raw/PublicsStream.cpp | ||
27 | I thought of it more as an implementation detail - it's just there so that GlobalsStream.cpp and PublicsStream.cpp can get the declarations they need for the common code. Can I keep it this way and move it to include if we ever decide we want this to be a more public API? |
nit: for include guards, CamelCase is usually converted to CAMEL_CASE, so s/GLOBALSSTREAM/GLOBALS_STREAM/