]> granicus.if.org Git - clang/commitdiff
Make -faccess-control and -fno-access-control driver options.
authorJohn McCall <rjmccall@apple.com>
Wed, 17 Mar 2010 01:32:13 +0000 (01:32 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 17 Mar 2010 01:32:13 +0000 (01:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98703 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
lib/Driver/Tools.cpp

index c2ed7e6506e58e75973cbc7695bec10bcbaed27b..2bb4980948cefbf7a72c3c96321fc486d6cf2474 100644 (file)
@@ -229,6 +229,7 @@ def exported__symbols__list : Separate<"-exported_symbols_list">;
 def e : JoinedOrSeparate<"-e">;
 def fPIC : Flag<"-fPIC">, Group<f_Group>;
 def fPIE : Flag<"-fPIE">, Group<f_Group>;
+def faccess_control : Flag<"-faccess-control">, Group<f_Group>;
 def fapple_kext : Flag<"-fapple-kext">, Group<f_Group>;
 def fasm_blocks : Flag<"-fasm-blocks">, Group<clang_ignored_f_Group>;
 def fassume_sane_operator_new : Flag<"-fassume-sane-operator-new">, Group<f_Group>;
@@ -282,6 +283,7 @@ def fmudflapth : Flag<"-fmudflapth">, Group<f_Group>;
 def fmudflap : Flag<"-fmudflap">, Group<f_Group>;
 def fnested_functions : Flag<"-fnested-functions">, Group<f_Group>;
 def fnext_runtime : Flag<"-fnext-runtime">, Group<f_Group>;
+def fno_access_control : Flag<"-fno-access-control">, Group<f_Group>;
 def fno_asynchronous_unwind_tables : Flag<"-fno-asynchronous-unwind-tables">, Group<f_Group>;
 def fno_assume_sane_operator_new : Flag<"-fno-assume-sane-operator-new">, Group<f_Group>;
 def fno_blocks : Flag<"-fno-blocks">, Group<f_Group>;
index 28a6a6900a23f2448d5e9d62a67e87cbe57e329b..86b46856d3655762297594a13343ed74f12512a2 100644 (file)
@@ -1085,6 +1085,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("-fblocks");
   }
 
+  // -fno-access-control is default (for now).
+  if (Args.hasFlag(options::OPT_faccess_control,
+                   options::OPT_fno_access_control,
+                   false))
+    CmdArgs.push_back("-faccess-control");
+
   // -fexceptions=0 is default.
   if (needsExceptions(Args, InputType, getToolChain().getTriple()))
     CmdArgs.push_back("-fexceptions");