]> granicus.if.org Git - clang/commitdiff
Revert r154321, pending more discussion.
authorDavid Chisnall <csdavec@swan.ac.uk>
Mon, 9 Apr 2012 17:25:11 +0000 (17:25 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Mon, 9 Apr 2012 17:25:11 +0000 (17:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154327 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CC1Options.td
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.h
lib/CodeGen/CGObjCGNU.cpp
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGenObjC/trace.m [deleted file]

index e212cb2556e46eeb6175d8f1f1df413676ee09a8..3ab8f83481833c098fdb14db5e69cb0823335b2c 100644 (file)
@@ -619,8 +619,6 @@ def print_ivar_layout : Flag<"-print-ivar-layout">,
   HelpText<"Enable Objective-C Ivar layout bitmap print trace">;
 def fobjc_fragile_abi : Flag<"-fobjc-fragile-abi">,
   HelpText<"Use Objective-C's fragile ABI">;
-def fobjc_trace : Flag<"-fobjc-trace">,
-  HelpText<"Enable tracing of Objective-C message sends">;
 def fno_objc_infer_related_result_type : Flag<
     "-fno-objc-infer-related-result-type">,
   HelpText<
index 3db345b499a45b89a80d956e49d1a775a3e0d163..1b6b20c6b31726c2087f81eae22a2d26523b6f16 100644 (file)
@@ -476,9 +476,6 @@ def fno_objc_infer_related_result_type : Flag<
   "-fno-objc-infer-related-result-type">, Group<f_Group>;
 def fobjc_link_runtime: Flag<"-fobjc-link-runtime">, Group<f_Group>;
 
-def fobjc_trace: Flag<"-fobjc-trace">, Group<f_Group>;
-def fno_objc_trace: Flag<"-fno-objc-trace">, Group<f_Group>;
-
 // Objective-C ABI options.
 def fobjc_abi_version_EQ : Joined<"-fobjc-abi-version=">, Group<f_Group>;
 def fobjc_nonfragile_abi_version_EQ : Joined<"-fobjc-nonfragile-abi-version=">, Group<f_Group>;
index ec18684f98929f7fcf8eedd79aadb10353b17aeb..e844f8869c40a6720bdb279254a4c9139394f836 100644 (file)
@@ -82,8 +82,6 @@ public:
                                   /// use of the inline keyword.
   unsigned NoNaNsFPMath      : 1; /// Assume FP arguments, results not NaN.
   unsigned NoZeroInitializedInBSS : 1; /// -fno-zero-initialized-in-bss
-  unsigned ObjCTrace          : 1; /// Emit tracing calls for visualising code
-                                   /// flow in Objective-C programs
   unsigned ObjCDispatchMethod : 2; /// Method of Objective-C dispatch to use.
   unsigned ObjCRuntimeHasARC : 1; /// The target runtime supports ARC natively
   unsigned ObjCRuntimeHasTerminate : 1; /// The ObjC runtime has objc_terminate
index 6cf370f79ea529468f414e030745196d2aa56db5..db0bd951c1e82c6b7d267fcdb88077109b49101c 100644 (file)
@@ -322,11 +322,6 @@ private:
   /// Function used for non-object declared property setters.
   LazyRuntimeFunction SetStructPropertyFn;
 
-  /// Function called before message sends, when tracing
-  LazyRuntimeFunction TraceEnterFn;
-  /// Function called after  message sends, when tracing
-  LazyRuntimeFunction TraceExitFn;
-
   /// The version of the runtime that this class targets.  Must match the
   /// version in the runtime.
   int RuntimeVersion;
@@ -773,9 +768,6 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion,
   SetStructPropertyFn.init(&CGM, "objc_setPropertyStruct", VoidTy, PtrTy, PtrTy, 
       PtrDiffTy, BoolTy, BoolTy, NULL);
 
-  TraceEnterFn.init(&CGM, "objc_trace_enter", VoidTy, IdTy, SelectorTy, NULL);
-  TraceExitFn.init(&CGM, "objc_trace_exit", VoidTy, IdTy, SelectorTy, NULL);
-
   // IMP type
   llvm::Type *IMPArgs[] = { IdTy, SelectorTy };
   IMPTy = llvm::PointerType::getUnqual(llvm::FunctionType::get(IdTy, IMPArgs,
@@ -1220,19 +1212,12 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
   ActualArgs[0] = CallArg(RValue::get(Receiver), ASTIdTy, false);
 
   imp = EnforceType(Builder, imp, MSI.MessengerType);
-  if (CGM.getCodeGenOpts().ObjCTrace) {
-    Builder.CreateCall2(TraceEnterFn, Receiver, cmd);
-  }
 
   llvm::Instruction *call;
   RValue msgRet = CGF.EmitCall(MSI.CallInfo, imp, Return, ActualArgs,
       0, &call);
   call->setMetadata(msgSendMDKind, node);
 
-  if (CGM.getCodeGenOpts().ObjCTrace) {
-    Builder.CreateCall2(TraceExitFn, Receiver, cmd);
-  }
-
 
   if (!isPointerSizedReturn) {
     messageBB = CGF.Builder.GetInsertBlock();
index 3bb68185448f5a325197e2f18f2d229d7343c425..8093d2f6dfd73ff2b5afd40e03f7c41b32e518a3 100644 (file)
@@ -2400,10 +2400,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("-fobjc-default-synthesize-properties");
   }
 
-  if (Args.hasFlag(options::OPT_fobjc_trace, options::OPT_fno_objc_trace,
-                   false))
-    CmdArgs.push_back("-fobjc-trace");
-
   // Allow -fno-objc-arr to trump -fobjc-arr/-fobjc-arc.
   // NOTE: This logic is duplicated in ToolChains.cpp.
   bool ARC = isObjCAutoRefCount(Args);
index aae0b48e75eb79f12aa151f07fbb897325a2296b..02947c778c32ab192808dd5c27ddbfe9c215ca76 100644 (file)
@@ -249,8 +249,6 @@ static void CodeGenOptsToArgs(const CodeGenOptions &Opts, ToArgsList &Res) {
     Res.push_back("-mconstructor-aliases");
   if (Opts.ObjCAutoRefCountExceptions)
     Res.push_back("-fobjc-arc-eh");
-  if (Opts.ObjCTrace)
-    Res.push_back("-fobjc-trace");
   if (!Opts.DebugPass.empty()) {
     Res.push_back("-mdebug-pass", Opts.DebugPass);
   }
@@ -1111,7 +1109,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   Opts.AsmVerbose = Args.hasArg(OPT_masm_verbose);
   Opts.ObjCAutoRefCountExceptions = Args.hasArg(OPT_fobjc_arc_exceptions);
-  Opts.ObjCTrace = Args.hasArg(OPT_fobjc_trace);
   Opts.ObjCRuntimeHasARC = Args.hasArg(OPT_fobjc_runtime_has_arc);
   Opts.ObjCRuntimeHasTerminate = Args.hasArg(OPT_fobjc_runtime_has_terminate);
   Opts.CUDAIsDevice = Args.hasArg(OPT_fcuda_is_device);
diff --git a/test/CodeGenObjC/trace.m b/test/CodeGenObjC/trace.m
deleted file mode 100644 (file)
index a67903a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-///RUN: %clang_cc1 -triple x86_64-unknown-freebsd9.0 -fobjc-trace -fgnu-runtime -fobjc-dispatch-method=non-legacy -emit-llvm -o - %s | FileCheck %s
-
-
-@interface A
-+ (id)msg;
-@end
-
-void f(void) {
-  [A msg];
-  // CHECK: call void @objc_trace_enter(
-  // CHECK: @objc_msgSend
-  // CHECK: call void @objc_trace_exit(
-}