Unreferenced nested structs and classes were omitted from the debug info. In DWARF, this was intentional, to avoid bloat. But, for CodeView, we want this information to be consistent with what Microsoft tools would produce and expect.
This is essentially my earlier patch with a switch to apply it only when generating CodeView.
Is getOrCreateMainFile correct here? I thought we'd use getOrCreateFile(RD->getLocation()), like this other code: