summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-04-03 00:44:15 +0000
committerEric Christopher <echristo@apple.com>2012-04-03 00:44:15 +0000
commitb7e821a6aa9abdfe6c7cf2bccae68e757089df8a (patch)
treef3edae2715f06d82669fa4fdb11842a6e6e54f72 /clang/test
parent34164196af54ffa242e0c92af1031af079709439 (diff)
downloadbcm5719-llvm-b7e821a6aa9abdfe6c7cf2bccae68e757089df8a.tar.gz
bcm5719-llvm-b7e821a6aa9abdfe6c7cf2bccae68e757089df8a.zip
Change location information for synthesized properties to be at the
property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Use the current scope location as a separate parameter so that we can match it up better in the line table with the beginning of the scope. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart and for the new metadata parameter and add a new testcase to make sure we've got the right line numbers for synthesized properties. Part of rdar://11026482 llvm-svn: 153917
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/debug-info-artificial-arg.cpp2
-rw-r--r--clang/test/CodeGenObjC/debug-info-block-helper.m2
-rw-r--r--clang/test/CodeGenObjC/debug-info-synthesis.m34
-rw-r--r--clang/test/CodeGenObjC/debug-property-synth.m3
4 files changed, 38 insertions, 3 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp b/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp
index 3806a1f8bfc..92d1b162f53 100644
--- a/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp
+++ b/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp
@@ -25,6 +25,6 @@ int main(int argc, char **argv) {
// FIXME: The numbers are truly awful.
// CHECK: !18 = metadata !{i32 {{.*}}, i32 0, metadata !"", i32 0, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !19} ; [ DW_TAG_pointer_type ]
// CHECK: !19 = metadata !{i32 {{.*}}, null, metadata !"A", metadata !6, i32 8, i64 128, i64 64, i32 0, i32 0, null, metadata !20, i32 0, metadata !19, null} ; [ DW_TAG_class_type ]
-// CHECK: metadata !19, metadata !"A", metadata !"A", metadata !"", metadata !6, i32 12, metadata !45, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null, i32 0, metadata !47} ; [ DW_TAG_subprogram ]
+// CHECK: metadata !19, metadata !"A", metadata !"A", metadata !"", metadata !6, i32 12, metadata !45, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null, i32 0, metadata !47, i32 12} ; [ DW_TAG_subprogram ]
// CHECK: metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !46, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
// CHECK: !46 = metadata !{null, metadata !18, metadata !9, metadata !34}
diff --git a/clang/test/CodeGenObjC/debug-info-block-helper.m b/clang/test/CodeGenObjC/debug-info-block-helper.m
index 8f88eb58a8b..28374cd16d7 100644
--- a/clang/test/CodeGenObjC/debug-info-block-helper.m
+++ b/clang/test/CodeGenObjC/debug-info-block-helper.m
@@ -2,7 +2,7 @@
// RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-fragile-abi %s -o - | FileCheck %s
extern void foo(void(^)(void));
-// CHECK: !40 = metadata !{i32 {{.*}}, i32 0, metadata !10, metadata !"__destroy_helper_block_", metadata !"__destroy_helper_block_", metadata !"", metadata !10, i32 24, metadata !41, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i8*)* @__destroy_helper_block_, null, null, metadata !43} ; [ DW_TAG_subprogram ]
+// CHECK: !40 = metadata !{i32 {{.*}}, i32 0, metadata !25, metadata !"__destroy_helper_block_", metadata !"__destroy_helper_block_", metadata !"", metadata !25, i32 24, metadata !41, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (i8*)* @__destroy_helper_block_, null, null, metadata !43, i32 24} ; [ DW_TAG_subprogram ]
@interface NSObject {
struct objc_object *isa;
diff --git a/clang/test/CodeGenObjC/debug-info-synthesis.m b/clang/test/CodeGenObjC/debug-info-synthesis.m
new file mode 100644
index 00000000000..389e6230356
--- /dev/null
+++ b/clang/test/CodeGenObjC/debug-info-synthesis.m
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -emit-llvm -g -w -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+# 1 "foo.m" 1
+# 1 "foo.m" 2
+# 1 "./foo.h" 1
+@interface NSObject {
+ struct objc_object *isa;
+}
+@end
+@class NSDictionary;
+
+@interface Foo : NSObject {}
+@property (strong, nonatomic) NSDictionary *dict;
+@end
+# 2 "foo.m" 2
+
+
+
+
+@implementation Foo
+@synthesize dict = _dict;
+
+- (void) bork {
+}
+@end
+
+int main(int argc, char *argv[]) {
+ @autoreleasepool {
+ Foo *f = [Foo new];
+ [f bork];
+ }
+}
+
+// CHECK: !11 = metadata !{i32 {{.*}}, metadata !"./foo.h"
+// CHECK: !29 = metadata !{i32 {{.*}}, i32 0, metadata !11, metadata !"-[Foo dict]", metadata !"-[Foo dict]", metadata !"", metadata !11, i32 8, metadata !30, i1 true, i1 true, i32 0, i32 0, null, i32 320, i1 false, %1* (%0*, i8*)* @"\01-[Foo dict]", null, null, metadata !32, i32 8} ; [ DW_TAG_subprogram ]
diff --git a/clang/test/CodeGenObjC/debug-property-synth.m b/clang/test/CodeGenObjC/debug-property-synth.m
index 05852b7e292..954620a6359 100644
--- a/clang/test/CodeGenObjC/debug-property-synth.m
+++ b/clang/test/CodeGenObjC/debug-property-synth.m
@@ -16,4 +16,5 @@ int main() {
return 0;
}
-// CHECK: .loc 2 10 0
+// FIXME: Make this test ir files.
+// CHECK: .loc 2 6 0
OpenPOWER on IntegriCloud