diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2010-05-22 02:21:53 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2010-05-22 02:21:53 +0000 |
| commit | e039148801bb3fddf727162205ae2532d02f85cd (patch) | |
| tree | 5f75b544ccfddd80d76465a5a05cc7ed13b219b2 /clang/lib/Driver | |
| parent | 78a151138ab52cfb743679285cc4c343bdfa9029 (diff) | |
| download | bcm5719-llvm-e039148801bb3fddf727162205ae2532d02f85cd.tar.gz bcm5719-llvm-e039148801bb3fddf727162205ae2532d02f85cd.zip | |
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.
llvm-svn: 104428
Diffstat (limited to 'clang/lib/Driver')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 36a1630aad9..896811d5d34 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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)); |

