[PATCH] D13221: Make CompilerInvocation's use of the debug options more understandable.

Douglas Katzman via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 12:18:44 PDT 2015


dougk created this revision.
dougk added reviewers: chandlerc, jyknight.
dougk added a subscriber: cfe-commits.

Both the Driver and the cc1 frontend play games with various combinations of 'g' group options.
It would be nice if at least the frontend could be sane, leaving the decision of what OS favors dwarf version N totally in the driver's hands.

As such, the Driver never passes a bare '-g' option nor lets the CompilerInvocation assume a default dwarf level.
Instead, an explicit choices of debug info kind is conveyed from the driver directly into the CodeGen options, and similarly the dwarf level.

At present this breaks hundreds of driver tests because they're looking for particular strings, but if people think this is the right way to do things, those tests can be fixed (and perhaps there's a genuine breakage or two, which must be fixed).

http://reviews.llvm.org/D13221

Files:
  include/clang/Driver/Options.td
  include/clang/Driver/ToolChain.h
  lib/Driver/ToolChains.h
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13221.35899.patch
Type: text/x-patch
Size: 14367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150928/b69dc8ac/attachment.bin>


More information about the cfe-commits mailing list