<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 11, 2015 at 1:49 PM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aprantl created this revision.<br>
aprantl added reviewers: dblaikie, echristo.<br>
aprantl added a subscriber: cfe-commits.<br>
aprantl set the repository for this revision to rL LLVM.<br>
<br>
This patch adds a -gmodules option to the driver and a -dwarf-ext-refs to cc1 to enable the use of external type references in the debug info (a.k.a. module debugging).<br>
<br>
The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1.<br>
Most options that start with -g (e.g., -gdwarf-2) also turn on -g, and module requires object-container-wrapped modules, "-dwarf-ext-refs" been the actual low-level option for turning on external type references.<br>
<br>
Rationale for the choice of names (and this is really all there is to review in this patch):<br>
"-gmodules": is meant to pair nicely with "-fmodules"<br>
"-dwarf-ext-refs": Fits into the naming scheme of similar options like "-dwarf-column-info" and "-dwarf-debug-flags". Spelling out the option "-dwarf-external-type-references" seemed to be overkill.<br></blockquote><div><br>Sounds reasonable - and the flag will be for more than just types eventually anyway (specifically references to members (functions, etc) of types too).<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">All this does at the moment is set a flag codegenopts. Having this flag in place is a prerequisite for emitting debug info into modules: The debug info for a module needs to use external type references for types defined in (other) modules or we would violate the minimal deserialization requirements (cf. test/PCH/check-deserializations.cpp).<br></blockquote><div><br>Could you explain what you mean by "violate the minimal deserialization requirements"<br><br>Mechanically, the patch looks fine/exactly what you'd expect. Feel free to commit whenever you're ready.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D11958" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11958</a><br>
<br>
Files:<br>
docs/CommandGuide/clang.rst<br>
include/clang/Driver/CC1Options.td<br>
include/clang/Driver/Options.td<br>
include/clang/Frontend/CodeGenOptions.def<br>
lib/CodeGen/CGDebugInfo.cpp<br>
lib/CodeGen/CGDebugInfo.h<br>
lib/CodeGen/ObjectFilePCHContainerOperations.cpp<br>
lib/Driver/Tools.cpp<br>
lib/Frontend/CompilerInvocation.cpp<br>
test/Driver/debug-options.c<br>
<br>
</blockquote></div><br></div></div>