From: Daniel Dunbar Date: Wed, 1 Apr 2009 00:27:44 +0000 (+0000) Subject: Tweak darwin::Assemble and add a FIXME. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e4fea6750dbac032c172f3279c63b7815b7423e;p=clang Tweak darwin::Assemble and add a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68165 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index f2a1f01175..e0dfdd1b86 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -962,10 +962,15 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Input = Inputs[0]; // Bit of a hack, this is only used for original inputs. + // + // FIXME: This is broken for preprocessed .s inputs. if (Input.isFilename() && - strcmp(Input.getFilename(), Input.getBaseInput()) == 0 && - Args.hasArg(options::OPT_g_Group)) - CmdArgs.push_back("--gstabs"); + strcmp(Input.getFilename(), Input.getBaseInput()) == 0) { + if (Args.hasArg(options::OPT_gstabs)) + CmdArgs.push_back("--gstabs"); + else if (Args.hasArg(options::OPT_g_Group)) + CmdArgs.push_back("--gdwarf2"); + } // Derived from asm spec. CmdArgs.push_back("-arch");