This is an archive of the discontinued LLVM Phabricator instance.

Rename some PDB classes
ClosedPublic

Authored by zturner on Apr 25 2017, 2:45 PM.

Details

Summary

There is no functional change here, just renames.

In the DBI stream, there is an embedded array of structs (1) that list the modules contributing to the PDB, with a reference to a separate stream in the PDB (2) for more details. Each of those streams mentioned in (2) is further subdivided into smaller substreams (3) that contain various types of data.

(1) is called ModInfo
(2) is called ModStream
(3) is called ModuleSubstream

While seemingly intuitive, these have been a source of endless confusion for me. Is the ModuleSubstream in the DBI stream or the ModStream? Does the ModInfo contain the symbol data or is that somewhere else?

I decided to rename these. The new names are longer, but hopefully more descriptive. The mapping from old to new is:

ModInfo -> DbiModuleDescriptor (by prefixing with Dbi, we re-iterate that it's part of the DBI stream, and by including the word "descriptor", we emphasize that there's only minimal metadata here)

ModStream -> ModuleDebugStream (by including the word debug, we reinforce that this is where all the debug info details are).

ModuleSubstream -> ModuleDebugFragment (by saying "fragment" instead of "substream", we emphasize that a ModuleDebugStream is built up from a collection of many fragments, and there is nothing else of importance in one of these streams besides the list of fragments.)

Diff Detail

Event Timeline

zturner created this revision.Apr 25 2017, 2:45 PM
This revision was automatically updated to reflect the committed changes.
llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp