The DBI stream contains a lot of bookkeeping information for other streams. In particular it contains information about section contributions and linked modules. This patch is a first attempt at parsing some of the information out of the DBI stream. It currently only parses and dumps the headers of the DBI stream, so none of the module data or section contribution data is pulled out. This is just a proof of concept that we understand the basic properties of the DBI stream's metadata, and followup patches will try to extract more detailed information out.
Details
Diff Detail
Event Timeline
lib/DebugInfo/PDB/Raw/PDBDbiStream.cpp | ||
---|---|---|
25–32 | You are in an anonymous namespace, no need for static. Also, these don't seem to correspond to the LLVM naming style. | |
74 | No need to stick this assertion in the constructor, I'd leave it with the type definition. | |
87–88 | All signatures != -1 are ok? | |
115 | This is a little confusing to read, why not just write return (Header->Flags & FLAG_INCREMENTAL_MASK) != 0; |
Is there a defined naming convention for global constants? I see one for variables and enumerators, which I guess if I were being liberal I could apply to global constants as well, but I didn't see a clear rule for how to name global constants.
lib/DebugInfo/PDB/Raw/PDBDbiStream.cpp | ||
---|---|---|
68 | The class is forward declared as private in PDBDbiStream.h, so it's inaccessible outside the constructor. I could declare it in the public section of the class, but it seemed more appropriate to be private. I don't feel strongly either way, so let me know if you do. |
lib/DebugInfo/PDB/Raw/PDBDbiStream.cpp | ||
---|---|---|
68 | I don't think you need to stick it in the public section of the class, the static_assert could just follow immediately after the definition of HeaderInfo. |
But it's forward declared as a private nested class, so you can't reference
the inner class except from within the outer class
You can remove *- C== -* since this file has .cpp file extension.