[cfe-commits] r67863 - in /cfe/trunk: include/clang/Driver/Options.def tools/clang-cc/clang.cpp

Mike Stump mrs at apple.com
Fri Mar 27 13:15:22 PDT 2009


Author: mrs
Date: Fri Mar 27 15:15:22 2009
New Revision: 67863

URL: http://llvm.org/viewvc/llvm-project?rev=67863&view=rev
Log:
Fixup -fcommon and -fno-common to be more gcc compatible.

Modified:
    cfe/trunk/include/clang/Driver/Options.def
    cfe/trunk/tools/clang-cc/clang.cpp

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

==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Fri Mar 27 15:15:22 2009
@@ -358,6 +358,7 @@
 OPTION("-fbootclasspath=", fbootclasspath_EQ, Joined, f_Group, INVALID, "", 0)
 OPTION("-fbuiltin", fbuiltin, Flag, clang_f_Group, INVALID, "", 0)
 OPTION("-fclasspath=", fclasspath_EQ, Joined, f_Group, INVALID, "", 0)
+OPTION("-fcommon", fcommon, Flag, clang_f_Group, INVALID, "", 0)
 OPTION("-fcompile-resource=", fcompile_resource_EQ, Joined, f_Group, INVALID, "", 0)
 OPTION("-fconstant-cfstrings", fconstant_cfstrings, Flag, f_Group, INVALID, "", 0)
 OPTION("-fcreate-profile", fcreate_profile, Flag, f_Group, INVALID, "", 0)

Modified: cfe/trunk/tools/clang-cc/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang.cpp?rev=67863&r1=67862&r2=67863&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/clang.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang.cpp Fri Mar 27 15:15:22 2009
@@ -1237,7 +1237,9 @@
 
 static llvm::cl::opt<bool>
 NoCommon("fno-common",
-         llvm::cl::desc("Compile common globals like normal definitions"));
+         llvm::cl::desc("Compile common globals like normal definitions"),
+         llvm::cl::ValueDisallowed, llvm::cl::AllowInverse,
+         llvm::cl::ZeroOrMore);
 
 // It might be nice to add bounds to the CommandLine library directly.
 struct OptLevelParser : public llvm::cl::parser<unsigned> {





More information about the cfe-commits mailing list