aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-05-22 02:21:53 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-05-22 02:21:53 +0000
commitc304ba341a7daa88da42faf8f86310b764dd7b6a (patch)
tree1f6b3567f2eda848a4d1780283fdd4e637a1a541 /lib/Driver/Tools.cpp
parentef072fd2f3347cfd857d6eb787b245b950771430 (diff)
Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn off the driver in the lexer test for this madness and add a test to the driver that the translation actually works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 36a1630aad..896811d5d3 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1078,6 +1078,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddLastArg(CmdArgs, options::OPT_trigraphs);
}
+ // Translate GCC's misnamer '-fasm' arguments to '-fgnu-keywords'.
+ if (Arg *Asm = Args.getLastArg(options::OPT_fasm, options::OPT_fno_asm)) {
+ if (Asm->getOption().matches(options::OPT_fasm))
+ CmdArgs.push_back("-fgnu-keywords");
+ else
+ CmdArgs.push_back("-fno-gnu-keywords");
+ }
+
if (Arg *A = Args.getLastArg(options::OPT_ftemplate_depth_)) {
CmdArgs.push_back("-ftemplate-depth");
CmdArgs.push_back(A->getValue(Args));