Support line table only DWARF for Swift. <rdar://problem/19106981>

The new option is called -gline-tables-only to mirror clang.

Swift SVN r23615
This commit is contained in:
Adrian Prantl
2014-12-02 17:44:23 +00:00
parent 747c279bb3
commit 41a30f5988
11 changed files with 71 additions and 23 deletions

View File

@@ -907,8 +907,12 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
using namespace options;
if (const Arg *A = Args.getLastArg(OPT_g_Group)) {
if (A->getOption().matches(OPT_g)) {
Opts.DebugInfo = true;
if (A->getOption().matches(OPT_g))
Opts.DebugInfoKind = IRGenDebugInfoKind::Normal;
else if (A->getOption().matches(options::OPT_gline_tables_only))
Opts.DebugInfoKind = IRGenDebugInfoKind::LineTables;
if (Opts.DebugInfoKind > IRGenDebugInfoKind::None) {
ArgStringList RenderedArgs;
for (auto A : Args)
A->render(Args, RenderedArgs);