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

Daniel Dunbar daniel at zuster.org
Fri Mar 20 16:49:28 PDT 2009


Author: ddunbar
Date: Fri Mar 20 18:49:28 2009
New Revision: 67420

URL: http://llvm.org/viewvc/llvm-project?rev=67420&view=rev
Log:
ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.

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

Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=67420&r1=67419&r2=67420&view=diff

==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Fri Mar 20 18:49:28 2009
@@ -231,8 +231,9 @@
                             "freestanding environment"));
 
 static llvm::cl::opt<bool>
-NoBuiltin("fno-builtin",
-          llvm::cl::desc("Disable implicit builtin knowledge of functions"));
+AllowBuiltins("fbuiltin",
+              llvm::cl::desc("Disable implicit builtin knowledge of functions"),
+              llvm::cl::init(true), llvm::cl::AllowInverse);
 
 
 static llvm::cl::opt<bool>
@@ -661,7 +662,7 @@
   if (EnableBlocks.getPosition())
     Options.Blocks = EnableBlocks;
 
-  if (NoBuiltin)
+  if (!AllowBuiltins)
     Options.NoBuiltin = 1;
   if (Freestanding)
     Options.Freestanding = Options.NoBuiltin = 1;

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

==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Fri Mar 20 18:49:28 2009
@@ -318,6 +318,7 @@
 OPTION("-fast", fast, Flag, f_Group, INVALID, "", 0)
 OPTION("-fblocks", fblocks, Flag, clang_f_Group, INVALID, "", 0)
 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("-fcompile-resource=", fcompile_resource_EQ, Joined, f_Group, INVALID, "", 0)
 OPTION("-fconstant-cfstrings", fconstant_cfstrings, Flag, f_Group, INVALID, "", 0)
@@ -344,6 +345,7 @@
 OPTION("-fnested-functions", fnested_functions, Flag, f_Group, INVALID, "", 0)
 OPTION("-fnext-runtime", fnext_runtime, Flag, clang_f_Group, INVALID, "", 0)
 OPTION("-fno-blocks", fno_blocks, Flag, clang_f_Group, INVALID, "", 0)
+OPTION("-fno-builtin", fno_builtin, Flag, clang_f_Group, INVALID, "", 0)
 OPTION("-fno-caret-diagnostics", fno_caret_diagnostics, Flag, clang_f_Group, INVALID, "", 0)
 OPTION("-fno-constant-cfstrings", fno_constant_cfstrings, Flag, f_Group, INVALID, "", 0)
 OPTION("-fno-eliminate-unused-debug-symbols", fno_eliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0)





More information about the cfe-commits mailing list