aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2012-04-09 15:42:15 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2012-04-09 15:42:15 +0000
commit649ee3fec12dcf7167630ff88087ad116e9eefa6 (patch)
tree2b788913f6a8820107f5e6a76c9653a5b0ca70f9 /lib/Driver/Tools.cpp
parente2571793ba6fc13e5525b8d7224812f99842a1a4 (diff)
Add -fobjc-trace to emit a call before and after each Objective-C message send
for hooking in code flow visualisation applications. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 8093d2f6df..3bb6818544 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -2400,6 +2400,10 @@ 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);