aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-19 21:20:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-19 21:20:32 +0000
commit7695fba30221613b7cf31276456217c41bb90960 (patch)
tree2a3e5aabcf3616229fb628c9b9bf3e7308b3e22d
parent9bebfadb807aba0bc272197aff1cb4b2284c00a6 (diff)
Forward f[no-]dollars-in-identifiers to clang, when specified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69549 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Driver/Options.def3
-rw-r--r--lib/Driver/Tools.cpp14
2 files changed, 14 insertions, 3 deletions
diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def
index 2bff5ffe16..6f6d45dea5 100644
--- a/include/clang/Driver/Options.def
+++ b/include/clang/Driver/Options.def
@@ -366,7 +366,7 @@ OPTION("-fdebug-pass-arguments", fdebug_pass_arguments, Flag, f_Group, INVALID,
OPTION("-fdebug-pass-structure", fdebug_pass_structure, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fdiagnostics-fixit-info", fdiagnostics_fixit_info, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fdiagnostics-show-option", fdiagnostics_show_option, Flag, f_Group, INVALID, "", 0, 0, 0)
-OPTION("-fdollars-in-identifiers", fdollars_in_identifiers, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
+OPTION("-fdollars-in-identifiers", fdollars_in_identifiers, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-feliminate-unused-debug-symbols", feliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-femit-all-decls", femit_all_decls, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fencoding=", fencoding_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
@@ -398,6 +398,7 @@ OPTION("-fno-common", fno_common, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-constant-cfstrings", fno_constant_cfstrings, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-diagnostics-fixit-info", fno_diagnostics_fixit_info, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-diagnostics-show-option", fno_diagnostics_show_option, Flag, f_Group, INVALID, "", 0, 0, 0)
+OPTION("-fno-dollars-in-identifiers", fno_dollars_in_identifiers, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-eliminate-unused-debug-symbols", fno_eliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-inline-functions", fno_inline_functions, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
OPTION("-fno-inline", fno_inline, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 09de3f88df..f0f2116f39 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -471,8 +471,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (!Args.hasFlag(options::OPT_fbuiltin, options::OPT_fno_builtin))
CmdArgs.push_back("-fbuiltin=0");
- // -fblocks default varies depending on platform and language;
- // -always pass if specified.
+ // -fblocks default varies depending on platform and language; only
+ // pass if specified.
if (Arg *A = Args.getLastArg(options::OPT_fblocks, options::OPT_fno_blocks)) {
if (A->getOption().matches(options::OPT_fblocks))
CmdArgs.push_back("-fblocks");
@@ -515,6 +515,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
options::OPT_fno_diagnostics_show_option))
CmdArgs.push_back("-fdiagnostics-show-option");
+ // -fdollars-in-identifiers default varies depending on platform and
+ // language; only pass if specified.
+ if (Arg *A = Args.getLastArg(options::OPT_fdollars_in_identifiers,
+ options::OPT_fno_dollars_in_identifiers)) {
+ if (A->getOption().matches(options::OPT_fdollars_in_identifiers))
+ CmdArgs.push_back("-fdollars-in-identifiers=1");
+ else
+ CmdArgs.push_back("-fdollars-in-identifiers=0");
+ }
+
Args.AddLastArg(CmdArgs, options::OPT_dM);
Args.AddLastArg(CmdArgs, options::OPT_dD);