[cfe-commits] r147449 - in /cfe/trunk: include/clang/Driver/Options.td lib/Driver/Tools.cpp

Douglas Gregor dgregor at apple.com
Tue Jan 3 09:13:05 PST 2012


Author: dgregor
Date: Tue Jan  3 11:13:05 2012
New Revision: 147449

URL: http://llvm.org/viewvc/llvm-project?rev=147449&view=rev
Log:
Add -fno-modules to the driver, to turn off modules (although they're off by default anyway).

Modified:
    cfe/trunk/include/clang/Driver/Options.td
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=147449&r1=147448&r2=147449&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue Jan  3 11:13:05 2012
@@ -417,6 +417,7 @@
 def fno_limit_debug_info : Flag<"-fno-limit-debug-info">, Group<f_Group>,
   HelpText<"Do not limit debug information produced to reduce size of debug binary">;
 def fno_merge_all_constants : Flag<"-fno-merge-all-constants">, Group<f_Group>;
+def fno_modules : Flag <"-fno-modules">, Group<f_Group>, Flags<[NoForward]>;
 def fno_ms_extensions : Flag<"-fno-ms-extensions">, Group<f_Group>;
 def fno_ms_compatibility : Flag<"-fno-ms-compatibility">, Group<f_Group>;
 def fno_delayed_template_parsing : Flag<"-fno-delayed-template-parsing">, Group<f_Group>;

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=147449&r1=147448&r2=147449&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Jan  3 11:13:05 2012
@@ -395,8 +395,6 @@
     CmdArgs.push_back(Args.MakeArgString(DefaultModuleCache));
   }
   
-  Args.AddAllArgs(CmdArgs, options::OPT_fmodules);
-
   // Parse additional include paths from environment variables.
   // FIXME: We should probably sink the logic for handling these from the
   // frontend into the driver. It will allow deleting 4 otherwise unused flags.
@@ -2023,6 +2021,9 @@
       CmdArgs.push_back("-fblocks-runtime-optional");
   }
 
+  if (Args.hasFlag(options::OPT_fmodules, options::OPT_fno_modules, false))
+    CmdArgs.push_back("-fmodules");
+
   // -faccess-control is default.
   if (Args.hasFlag(options::OPT_fno_access_control,
                    options::OPT_faccess_control,





More information about the cfe-commits mailing list