summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests/blocks.m
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2019-10-31 16:22:10 +0000
committerJeremy Morse <jeremy.morse@sony.com>2019-10-31 16:22:10 +0000
commitcb935f345683194e42e6e883d79c5a16479acd74 (patch)
treecfb11e7bf901b8edf3b78dc97bbb5275190e9b4c /debuginfo-tests/blocks.m
parentf2cb9c0eabc132152b5b3ad4c87a5a02345a883d (diff)
downloadbcm5719-llvm-cb935f345683194e42e6e883d79c5a16479acd74.tar.gz
bcm5719-llvm-cb935f345683194e42e6e883d79c5a16479acd74.zip
Revert "Import Dexter to debuginfo-tests"
This reverts commit f78c236efda85af1e526ac35ed535ef4786450e3. Green dragon breakage was observed; I'll take a look at why.
Diffstat (limited to 'debuginfo-tests/blocks.m')
-rw-r--r--debuginfo-tests/blocks.m43
1 files changed, 43 insertions, 0 deletions
diff --git a/debuginfo-tests/blocks.m b/debuginfo-tests/blocks.m
new file mode 100644
index 00000000000..8e5a2121320
--- /dev/null
+++ b/debuginfo-tests/blocks.m
@@ -0,0 +1,43 @@
+// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
+// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation
+// RUN: %test_debuginfo %s %t.out
+
+// REQUIRES: system-darwin
+// Radar 9279956
+
+// DEBUGGER: break 31
+// DEBUGGER: r
+// DEBUGGER: p m2
+// CHECK: ${{[0-9]}} = 1
+// DEBUGGER: p dbTransaction
+// CHECK: ${{[0-9]}} = 0
+// DEBUGGER: p master
+// CHECK: ${{[0-9]}} = 0
+
+#include <Cocoa/Cocoa.h>
+
+extern void foo(void(^)(void));
+
+@interface A:NSObject @end
+@implementation A
+- (void) helper {
+ int master = 0;
+ __block int m2 = 0;
+ __block int dbTransaction = 0;
+ int (^x)(void) = ^(void) { (void) self;
+ (void) master;
+ (void) dbTransaction;
+ m2++;
+ return m2;
+ };
+ master = x();
+}
+@end
+
+void foo(void(^x)(void)) {}
+
+int main() {
+ A *a = [A alloc];
+ [a helper];
+ return 0;
+}
OpenPOWER on IntegriCloud