diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-20 23:49:28 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-20 23:49:28 +0000 |
commit | a792bad8248a8c7f5f91a713cc61b87d18b771e0 (patch) | |
tree | 1207cdc196a11ce0af2b8f5e4eae4e7612d82345 | |
parent | 8b2c1cd5a26827d8c685c2863ed59bcd036faa9e (diff) | |
download | bcm5719-llvm-a792bad8248a8c7f5f91a713cc61b87d18b771e0.tar.gz bcm5719-llvm-a792bad8248a8c7f5f91a713cc61b87d18b771e0.zip |
ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.
llvm-svn: 67420
-rw-r--r-- | clang/Driver/clang.cpp | 7 | ||||
-rw-r--r-- | clang/include/clang/Driver/Options.def | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index c42d3758823..093dc1a2cd2 100644 --- a/clang/Driver/clang.cpp +++ b/clang/Driver/clang.cpp @@ -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; diff --git a/clang/include/clang/Driver/Options.def b/clang/include/clang/Driver/Options.def index f043efb383b..250899673d6 100644 --- a/clang/include/clang/Driver/Options.def +++ b/clang/include/clang/Driver/Options.def @@ -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) |