[cfe-commits] r63778 - in /cfe/trunk/tools/ccc/ccclib: Arguments.py Tools.py

Daniel Dunbar daniel at zuster.org
Wed Feb 4 13:21:08 PST 2009


Author: ddunbar
Date: Wed Feb  4 15:21:08 2009
New Revision: 63778

URL: http://llvm.org/viewvc/llvm-project?rev=63778&view=rev
Log:
ccc: Forward -femit-all-decls to clang and use an option group to
simplify handling of -f options clang recognizes.

Modified:
    cfe/trunk/tools/ccc/ccclib/Arguments.py
    cfe/trunk/tools/ccc/ccclib/Tools.py

Modified: cfe/trunk/tools/ccc/ccclib/Arguments.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Arguments.py?rev=63778&r1=63777&r2=63778&view=diff

==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Arguments.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Arguments.py Wed Feb  4 15:21:08 2009
@@ -774,6 +774,7 @@
         # self.fblocksOption = self.addOption(JoinedOption('-fblocks', self.fblocksGroup))
         
         self.fGroup = OptionGroup('-f')
+        self.Clang_fGroup = OptionGroup('-f', self.fGroup)
         self.fastOption = self.addOption(FlagOption('-fast', self.fGroup))
         self.fastfOption = self.addOption(FlagOption('-fastf', self.fGroup))
         self.fastcpOption = self.addOption(FlagOption('-fastcp', self.fGroup))
@@ -787,33 +788,33 @@
         self.f_debugPassArgumentsOption = self.addOption(FlagOption('-fdebug-pass-arguments', self.fGroup))
         self.f_debugPassStructureOption = self.addOption(FlagOption('-fdebug-pass-structure', self.fGroup))
         self.f_eliminateUnusedDebugSymbolsOption = self.addOption(FlagOption('-feliminate-unused-debug-symbols', self.fGroup))
+        self.addOption(FlagOption('-femit-all-decls', self.Clang_fGroup))
         self.f_encodingOption = self.addOption(JoinedOption('-fencoding=', self.fGroup))
-        self.f_exceptionsOption = self.addOption(FlagOption('-fexceptions', self.fGroup))
+        self.f_exceptionsOption = self.addOption(FlagOption('-fexceptions', self.Clang_fGroup))
         self.f_extdirsOption = self.addOption(JoinedOption('-fextdirs=', self.fGroup))
-        self.f_gnuRuntimeOption = self.addOption(FlagOption('-fgnu-runtime', self.fGroup))
-        self.f_gnuRuntimeOption = self.addOption(FlagOption('-fgnu-runtime', self.fGroup))
+        self.f_gnuRuntimeOption = self.addOption(FlagOption('-fgnu-runtime', self.Clang_fGroup))
         self.f_indirectVirtualCallsOption = self.addOption(FlagOption('-findirect-virtual-calls', self.fGroup))
-        self.f_laxVectorConversionsOption = self.addOption(FlagOption('-flax-vector-conversions', self.fGroup))
+        self.f_laxVectorConversionsOption = self.addOption(FlagOption('-flax-vector-conversions', self.Clang_fGroup))
         self.f_limitedPrecisionOption = self.addOption(JoinedOption('-flimited-precision=', self.fGroup))
-        self.f_msExtensionsOption = self.addOption(FlagOption('-fms-extensions', self.fGroup))
+        self.f_msExtensionsOption = self.addOption(FlagOption('-fms-extensions', self.Clang_fGroup))
         self.f_mudflapOption = self.addOption(FlagOption('-fmudflap', self.fGroup))
         self.f_mudflapthOption = self.addOption(FlagOption('-fmudflapth', self.fGroup))
         self.f_nestedFunctionsOption = self.addOption(FlagOption('-fnested-functions', self.fGroup))
-        self.f_nextRuntimeOption = self.addOption(FlagOption('-fnext-runtime', self.fGroup))
-        self.f_noCaretDiagnosticsOption = self.addOption(FlagOption('-fno-caret-diagnostics', self.fGroup))
+        self.f_nextRuntimeOption = self.addOption(FlagOption('-fnext-runtime', self.Clang_fGroup))
+        self.f_noCaretDiagnosticsOption = self.addOption(FlagOption('-fno-caret-diagnostics', self.Clang_fGroup))
         self.f_noConstantCfstringsOption = self.addOption(FlagOption('-fno-constant-cfstrings', self.fGroup))
         self.f_noEliminateUnusedDebugSymbolsOption = self.addOption(FlagOption('-fno-eliminate-unused-debug-symbols', self.fGroup))
         self.f_noPascalStringsOption = self.addOption(FlagOption('-fno-pascal-strings', self.fGroup))
-        self.f_noShowColumnOption = self.addOption(FlagOption('-fno-show-column', self.fGroup))
+        self.f_noShowColumnOption = self.addOption(FlagOption('-fno-show-column', self.Clang_fGroup))
         self.f_noWorkingDirectoryOption = self.addOption(FlagOption('-fno-working-directory', self.fGroup))
-        self.f_objcGcOnlyOption = self.addOption(FlagOption('-fobjc-gc-only', self.fGroup))
-        self.f_objcGcOption = self.addOption(FlagOption('-fobjc-gc', self.fGroup))
-        self.f_objcNonfragileAbiOption = self.addOption(FlagOption('-fobjc-nonfragile-abi', self.fGroup))
+        self.f_objcGcOnlyOption = self.addOption(FlagOption('-fobjc-gc-only', self.Clang_fGroup))
+        self.f_objcGcOption = self.addOption(FlagOption('-fobjc-gc', self.Clang_fGroup))
+        self.f_objcNonfragileAbiOption = self.addOption(FlagOption('-fobjc-nonfragile-abi', self.Clang_fGroup))
         self.f_objcOption = self.addOption(FlagOption('-fobjc', self.fGroup))
         self.f_omitFramePointerOption = self.addOption(FlagOption('-fomit-frame-pointer', self.fGroup))
         self.f_openmpOption = self.addOption(FlagOption('-fopenmp', self.fGroup))
         self.f_outputClassDirOption = self.addOption(JoinedOption('-foutput-class-dir=', self.fGroup))
-        self.f_pascalStringsOption = self.addOption(FlagOption('-fpascal-strings', self.fGroup))
+        self.f_pascalStringsOption = self.addOption(FlagOption('-fpascal-strings', self.Clang_fGroup))
         self.f_pieOption = self.addOption(FlagOption('-fpie', self.fGroup))
         self.f_PIEOption = self.addOption(FlagOption('-fPIE', self.fGroup))
         self.f_picOption = self.addOption(FlagOption('-fpic', self.fGroup))
@@ -824,7 +825,7 @@
         self.f_timeReportOption = self.addOption(FlagOption('-ftime-report', self.fGroup))
         self.f_traditionalOption = self.addOption(FlagOption('-ftraditional', self.fGroup))
         self.f_unwindTablesOption = self.addOption(FlagOption('-funwind-tables', self.fGroup))
-        self.f_writableStringsOption = self.addOption(FlagOption('-fwritable-strings', self.fGroup))
+        self.f_writableStringsOption = self.addOption(FlagOption('-fwritable-strings', self.Clang_fGroup))
         self.f_zeroInitializedInBssOption = self.addOption(FlagOption('-fzero-initialized-in-bss', self.fGroup))
         self.fOption = self.addOption(JoinedOption('-f', self.fGroup))
 

Modified: cfe/trunk/tools/ccc/ccclib/Tools.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Tools.py?rev=63778&r1=63777&r2=63778&view=diff

==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Tools.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Tools.py Wed Feb  4 15:21:08 2009
@@ -312,18 +312,7 @@
         arglist.addLastArg(cmd_args, arglist.parser.wOption)
         arglist.addAllArgs3(cmd_args, arglist.parser.stdOption, arglist.parser.ansiOption, arglist.parser.trigraphsOption)
 
-        arglist.addAllArgs(cmd_args, arglist.parser.f_objcGcOption)
-        arglist.addAllArgs(cmd_args, arglist.parser.f_objcGcOnlyOption)
-        arglist.addAllArgs(cmd_args, arglist.parser.f_objcNonfragileAbiOption)
-        arglist.addAllArgs(cmd_args, arglist.parser.f_nextRuntimeOption)
-        arglist.addAllArgs(cmd_args, arglist.parser.f_gnuRuntimeOption)
-        arglist.addLastArg(cmd_args, arglist.parser.f_exceptionsOption)
-        arglist.addLastArg(cmd_args, arglist.parser.f_laxVectorConversionsOption)
-        arglist.addLastArg(cmd_args, arglist.parser.f_msExtensionsOption)
-        arglist.addLastArg(cmd_args, arglist.parser.f_noCaretDiagnosticsOption)
-        arglist.addLastArg(cmd_args, arglist.parser.f_noShowColumnOption)
-        arglist.addLastArg(cmd_args, arglist.parser.f_pascalStringsOption)
-        arglist.addLastArg(cmd_args, arglist.parser.f_writableStringsOption)
+        arglist.addAllArgs(cmd_args, arglist.parser.Clang_fGroup)
 
         for arg in arglist.getArgs(arglist.parser.XclangOption):
             cmd_args.extend(arglist.getValues(arg))





More information about the cfe-commits mailing list