diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2012-04-09 15:42:15 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2012-04-09 15:42:15 +0000 |
commit | 649ee3fec12dcf7167630ff88087ad116e9eefa6 (patch) | |
tree | 2b788913f6a8820107f5e6a76c9653a5b0ca70f9 /test/CodeGenObjC | |
parent | e2571793ba6fc13e5525b8d7224812f99842a1a4 (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 'test/CodeGenObjC')
-rw-r--r-- | test/CodeGenObjC/trace.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenObjC/trace.m b/test/CodeGenObjC/trace.m new file mode 100644 index 0000000000..a67903a58a --- /dev/null +++ b/test/CodeGenObjC/trace.m @@ -0,0 +1,13 @@ +///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( +} |