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

Daniel Dunbar daniel at zuster.org
Thu Mar 26 09:12:10 PDT 2009


Author: ddunbar
Date: Thu Mar 26 11:12:09 2009
New Revision: 67757

URL: http://llvm.org/viewvc/llvm-project?rev=67757&view=rev
Log:
Driver: Fix a number of option definition mismatches (flags instead of
separate, or vice versa).

Also, fix initialization of LinkingOutput variable.

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

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

==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Thu Mar 26 11:12:09 2009
@@ -312,7 +312,8 @@
 OPTION("-Xpreprocessor", Xpreprocessor, Separate, INVALID, INVALID, "", 0)
 OPTION("-X", X_Flag, Flag, INVALID, INVALID, "", 0)
 OPTION("-X", X_Joined, Joined, INVALID, INVALID, "", 0)
-OPTION("-Z", Z, JoinedOrSeparate, INVALID, INVALID, "", 0)
+OPTION("-Z", Z_Flag, Flag, INVALID, INVALID, "", 0)
+OPTION("-Z", Z_Joined, Joined, INVALID, INVALID, "", 0)
 OPTION("-all_load", all__load, Flag, INVALID, INVALID, "", 0)
 OPTION("-allowable_client", allowable__client, Separate, INVALID, INVALID, "", 0)
 OPTION("-ansi", ansi, Flag, a_Group, INVALID, "", 0)
@@ -430,7 +431,7 @@
 OPTION("-headerpad_max_install_names", headerpad__max__install__names, Joined, INVALID, INVALID, "", 0)
 OPTION("-idirafter", idirafter, JoinedOrSeparate, i_Group, INVALID, "", 0)
 OPTION("-imacros", imacros, JoinedOrSeparate, i_Group, INVALID, "", 0)
-OPTION("-image_base", image__base, Flag, INVALID, INVALID, "", 0)
+OPTION("-image_base", image__base, Separate, INVALID, INVALID, "", 0)
 OPTION("-include", include, JoinedOrSeparate, i_Group, INVALID, "", 0)
 OPTION("-init", init, Separate, INVALID, INVALID, "", 0)
 OPTION("-install_name", install__name, Separate, INVALID, INVALID, "", 0)
@@ -442,7 +443,7 @@
 OPTION("-iwithprefix", iwithprefix, JoinedOrSeparate, i_Group, INVALID, "", 0)
 OPTION("-iwithsysroot", iwithsysroot, JoinedOrSeparate, i_Group, INVALID, "", 0)
 OPTION("-i", i, Joined, i_Group, INVALID, "", 0)
-OPTION("-keep_private_externs", keep__private__externs, JoinedOrSeparate, INVALID, INVALID, "", 0)
+OPTION("-keep_private_externs", keep__private__externs, Flag, INVALID, INVALID, "", 0)
 OPTION("-l", l, JoinedOrSeparate, INVALID, INVALID, "l", 0)
 OPTION("-m32", m32, Flag, m_Group, INVALID, "", 0)
 OPTION("-m3dnowa", m3dnowa, Flag, m_Group, INVALID, "", 0)
@@ -499,7 +500,7 @@
 OPTION("-nostdlib", nostdlib, Flag, INVALID, INVALID, "", 0)
 OPTION("-object", object, Flag, INVALID, INVALID, "", 0)
 OPTION("-o", o, JoinedOrSeparate, INVALID, INVALID, "di", 0)
-OPTION("-pagezero_size", pagezero__size, Flag, INVALID, INVALID, "", 0)
+OPTION("-pagezero_size", pagezero__size, JoinedOrSeparate, INVALID, INVALID, "", 0)
 OPTION("-pass-exit-codes", pass_exit_codes, Flag, INVALID, INVALID, "", 0)
 OPTION("-pedantic-errors", pedantic_errors, Flag, pedantic_Group, INVALID, "", 0)
 OPTION("-pedantic", pedantic, Flag, pedantic_Group, INVALID, "", 0)
@@ -530,10 +531,10 @@
 OPTION("-seg1addr", seg1addr, JoinedOrSeparate, INVALID, INVALID, "", 0)
 OPTION("-seg_addr_table_filename", seg__addr__table__filename, Separate, INVALID, INVALID, "", 0)
 OPTION("-seg_addr_table", seg__addr__table, Separate, INVALID, INVALID, "", 0)
-OPTION("-segaddr", segaddr, Separate, INVALID, INVALID, "", 0)
+OPTION("-segaddr", segaddr, MultiArg, INVALID, INVALID, "", 2)
 OPTION("-segcreate", segcreate, MultiArg, INVALID, INVALID, "", 3)
 OPTION("-seglinkedit", seglinkedit, Flag, INVALID, INVALID, "", 0)
-OPTION("-segprot", segprot, JoinedOrSeparate, INVALID, INVALID, "", 0)
+OPTION("-segprot", segprot, MultiArg, INVALID, INVALID, "", 3)
 OPTION("-segs_read_only_addr", segs__read__only__addr, Separate, INVALID, INVALID, "", 0)
 OPTION("-segs_read_write_addr", segs__read__write__addr, Separate, INVALID, INVALID, "", 0)
 OPTION("-segs_read_", segs__read__, Joined, INVALID, INVALID, "", 0)
@@ -554,11 +555,11 @@
 OPTION("-trigraphs", trigraphs, Flag, INVALID, INVALID, "", 0)
 OPTION("-twolevel_namespace_hints", twolevel__namespace__hints, Flag, INVALID, INVALID, "", 0)
 OPTION("-twolevel_namespace", twolevel__namespace, Flag, INVALID, INVALID, "", 0)
-OPTION("-t", t, JoinedOrSeparate, INVALID, INVALID, "", 0)
-OPTION("-umbrella", umbrella, Separate, u_Group, INVALID, "", 0)
+OPTION("-t", t, Flag, INVALID, INVALID, "", 0)
+OPTION("-umbrella", umbrella, Separate, INVALID, INVALID, "", 0)
 OPTION("-undefined", undefined, JoinedOrSeparate, u_Group, INVALID, "", 0)
 OPTION("-undef", undef, Flag, u_Group, INVALID, "", 0)
-OPTION("-unexported_symbols_list", unexported__symbols__list, Separate, u_Group, INVALID, "", 0)
+OPTION("-unexported_symbols_list", unexported__symbols__list, Separate, INVALID, INVALID, "", 0)
 OPTION("-u", u, JoinedOrSeparate, u_Group, INVALID, "", 0)
 OPTION("-v", v, Flag, INVALID, INVALID, "", 0)
 OPTION("-weak-l", weak_l, Joined, INVALID, INVALID, "l", 0)

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

==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Mar 26 11:12:09 2009
@@ -547,7 +547,7 @@
 
   // Reject -Z* at the top level, these options should never have been
   // exposed by gcc.
-  if (Arg *A = Args.getLastArg(options::OPT_Z))
+  if (Arg *A = Args.getLastArg(options::OPT_Z_Joined))
     Diag(clang::diag::err_drv_use_of_Z_option) << A->getAsString(Args);
 
   // Construct the actions to perform.
@@ -693,7 +693,7 @@
     // FIXME: This is a hack; find a cleaner way to integrate this
     // into the process.
     const char *LinkingOutput = 0;
-    if (isa<LinkJobAction>(A)) {
+    if (isa<LipoJobAction>(A)) {
       if (FinalOutput)
         LinkingOutput = FinalOutput->getValue(C.getArgs());
       else





More information about the cfe-commits mailing list