summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-01 00:27:44 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-01 00:27:44 +0000
commit5c9c118600667501aa7ae643a3f78c287c330004 (patch)
tree1fece08fdecb270e1c5551d0622e620f6f6a607b /clang/lib
parent0df70517836f6119ce13ab644bd0995e53871ff1 (diff)
downloadbcm5719-llvm-5c9c118600667501aa7ae643a3f78c287c330004.tar.gz
bcm5719-llvm-5c9c118600667501aa7ae643a3f78c287c330004.zip
Tweak darwin::Assemble and add a FIXME.
llvm-svn: 68165
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Tools.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index f2a1f01175b..e0dfdd1b86b 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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");
OpenPOWER on IntegriCloud