summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.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
commit4ec2af2fab89f8a63f681de9db139b69165e16b3 (patch)
tree3f3f60af68f4d148b80e08da63491deca781b549 /clang/lib/Frontend/CompilerInvocation.cpp
parent2eec367227d2d08c3b6460efe6fe5d0a9375b2b2 (diff)
downloadbcm5719-llvm-4ec2af2fab89f8a63f681de9db139b69165e16b3.tar.gz
bcm5719-llvm-4ec2af2fab89f8a63f681de9db139b69165e16b3.zip
Add -fobjc-trace to emit a call before and after each Objective-C message send
for hooking in code flow visualisation applications. llvm-svn: 154321
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 02947c778c3..aae0b48e75e 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -249,6 +249,8 @@ 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);
}
@@ -1109,6 +1111,7 @@ 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);
OpenPOWER on IntegriCloud