]> granicus.if.org Git - clang/commitdiff
ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 20 Mar 2009 23:49:28 +0000 (23:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 20 Mar 2009 23:49:28 +0000 (23:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67420 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp
include/clang/Driver/Options.def

index c42d375882379ce0cd18525f6a7c7b87cc21c729..093dc1a2cd2da3579388be8b49660c50c7587d67 100644 (file)
@@ -231,8 +231,9 @@ Freestanding("ffreestanding",
                             "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 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK,
   if (EnableBlocks.getPosition())
     Options.Blocks = EnableBlocks;
 
-  if (NoBuiltin)
+  if (!AllowBuiltins)
     Options.NoBuiltin = 1;
   if (Freestanding)
     Options.Freestanding = Options.NoBuiltin = 1;
index f043efb383bf8b4a799b103afa5169e2f5fdc945..250899673d6b5f3765f918e88c8106f4700ff52a 100644 (file)
@@ -318,6 +318,7 @@ OPTION("-fastf", fastf, Flag, f_Group, INVALID, "", 0)
 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("-fmudflap", fmudflap, Flag, f_Group, INVALID, "", 0)
 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)