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

Daniel Dunbar daniel at zuster.org
Tue Apr 14 19:37:44 PDT 2009


Author: ddunbar
Date: Tue Apr 14 21:37:43 2009
New Revision: 69131

URL: http://llvm.org/viewvc/llvm-project?rev=69131&view=rev
Log:
Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
 - <rdar://problem/6790309> ER: Support
   -fsigned-bitfields/-funsigned-bitfields

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

Modified: cfe/trunk/include/clang/Driver/Options.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.def?rev=69131&r1=69130&r2=69131&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Tue Apr 14 21:37:43 2009
@@ -498,6 +498,7 @@
 OPTION("-fprofile-arcs", fprofile_arcs, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-fprofile-generate", fprofile_generate, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-framework", framework, Separate, INVALID, INVALID, "l", 0, 0, 0)
+OPTION("-fsigned-bitfields", fsigned_bitfields, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-fstack-protector", fstack_protector, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
 OPTION("-fstrict-aliasing", fstrict_aliasing, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
 OPTION("-fsyntax-only", fsyntax_only, Flag, INVALID, INVALID, "d", 0, 0, 0)
@@ -506,6 +507,7 @@
 OPTION("-ftime-report", ftime_report, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-ftraditional", ftraditional, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-ftrapv", ftrapv, Flag, f_Group, INVALID, "", 0, 0, 0)
+OPTION("-funsigned-bitfields", funsigned_bitfields, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-funwind-tables", funwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-fverbose-asm", fverbose_asm, Flag, f_Group, INVALID, "", 0, 0, 0)
 OPTION("-fvisibility=", fvisibility_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=69131&r1=69130&r2=69131&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Apr 14 21:37:43 2009
@@ -473,6 +473,13 @@
   if (!Args.hasFlag(options::OPT_fcommon, options::OPT_fno_common))
     CmdArgs.push_back("-fno-common");
 
+  // -fsigned-bitfields is default, and clang doesn't yet support
+  // --funsigned-bitfields.
+  if (!Args.hasFlag(options::OPT_fsigned_bitfields, 
+                    options::OPT_funsigned_bitfields))
+    D.Diag(clang::diag::warn_drv_clang_unsupported)
+      << Args.getLastArg(options::OPT_funsigned_bitfields)->getAsString(Args);
+
   Args.AddLastArg(CmdArgs, options::OPT_dM);
   Args.AddLastArg(CmdArgs, options::OPT_dD);
 





More information about the cfe-commits mailing list