summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjCXX/debug-info-line.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjCXX/debug-info-line.mm')
-rw-r--r--test/CodeGenObjCXX/debug-info-line.mm30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGenObjCXX/debug-info-line.mm b/test/CodeGenObjCXX/debug-info-line.mm
new file mode 100644
index 0000000..4c934f1
--- /dev/null
+++ b/test/CodeGenObjCXX/debug-info-line.mm
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -gline-tables-only -fblocks -emit-llvm %s -o - | FileCheck %s
+
+void fn();
+
+struct foo {
+ ~foo();
+};
+
+void f1() {
+ ^{
+ foo f;
+ fn();
+ // CHECK: cleanup, !dbg [[DBG_F1:![0-9]*]]
+#line 100
+ }();
+}
+
+// CHECK-LABEL: define internal i8* @"\01-[TNSObject init]"
+@implementation TNSObject
+- (id)init
+{
+ foo f;
+ fn();
+ // CHECK: cleanup, !dbg [[DBG_TNSO:![0-9]*]]
+#line 200
+}
+@end
+
+// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
+// CHECK: [[DBG_TNSO]] = !MDLocation(line: 200,
OpenPOWER on IntegriCloud