summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-03 17:25:55 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-03 17:25:55 +0000
commitf04be1fb3a9f4b8a7591824d6985556ac578e3cf (patch)
tree67c831ea44725cbc04fa0a14fbebea1f1f7aea56 /clang/test/CodeGenObjC
parente274180f0efb5ff3358cf6076846b4cb326b2ed7 (diff)
downloadbcm5719-llvm-f04be1fb3a9f4b8a7591824d6985556ac578e3cf.tar.gz
bcm5719-llvm-f04be1fb3a9f4b8a7591824d6985556ac578e3cf.zip
DebugInfo: Move new hierarchy into place (clang)
Update testcases for LLVM change in r231082 to use the new debug info hierarchy. llvm-svn: 231083
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/2010-02-09-DbgSelf.m2
-rw-r--r--clang/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m2
-rw-r--r--clang/test/CodeGenObjC/arc-linetable.m4
-rw-r--r--clang/test/CodeGenObjC/block-byref-debuginfo.m5
-rw-r--r--clang/test/CodeGenObjC/catch-lexical-block.m8
-rw-r--r--clang/test/CodeGenObjC/debug-info-block-captured-self.m10
-rw-r--r--clang/test/CodeGenObjC/debug-info-block-helper.m2
-rw-r--r--clang/test/CodeGenObjC/debug-info-block-type.m17
-rw-r--r--clang/test/CodeGenObjC/debug-info-blocks.m8
-rw-r--r--clang/test/CodeGenObjC/debug-info-fwddecl.m7
-rw-r--r--clang/test/CodeGenObjC/debug-info-getter-name.m2
-rw-r--r--clang/test/CodeGenObjC/debug-info-id-with-protocol.m11
-rw-r--r--clang/test/CodeGenObjC/debug-info-impl.m3
-rw-r--r--clang/test/CodeGenObjC/debug-info-instancetype.m13
-rw-r--r--clang/test/CodeGenObjC/debug-info-ivars-extension.m22
-rw-r--r--clang/test/CodeGenObjC/debug-info-ivars-indirect.m8
-rw-r--r--clang/test/CodeGenObjC/debug-info-ivars-private.m15
-rw-r--r--clang/test/CodeGenObjC/debug-info-ivars.m28
-rw-r--r--clang/test/CodeGenObjC/debug-info-lifetime-crash.m8
-rw-r--r--clang/test/CodeGenObjC/debug-info-property-accessors.m3
-rw-r--r--clang/test/CodeGenObjC/debug-info-property3.m4
-rw-r--r--clang/test/CodeGenObjC/debug-info-pubtypes.m4
-rw-r--r--clang/test/CodeGenObjC/debug-info-self.m16
-rw-r--r--clang/test/CodeGenObjC/debug-info-static-var.m4
-rw-r--r--clang/test/CodeGenObjC/debug-info-synthesis.m7
-rw-r--r--clang/test/CodeGenObjC/debug-info-variadic-method.m4
-rw-r--r--clang/test/CodeGenObjC/debug-property-synth.m4
-rw-r--r--clang/test/CodeGenObjC/debuginfo-properties.m17
-rw-r--r--clang/test/CodeGenObjC/objc-fixed-enum.m40
29 files changed, 198 insertions, 80 deletions
diff --git a/clang/test/CodeGenObjC/2010-02-09-DbgSelf.m b/clang/test/CodeGenObjC/2010-02-09-DbgSelf.m
index d70b3d68e82..695a964a69d 100644
--- a/clang/test/CodeGenObjC/2010-02-09-DbgSelf.m
+++ b/clang/test/CodeGenObjC/2010-02-09-DbgSelf.m
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -x objective-c -emit-llvm -g < %s | FileCheck %s
// Test to check that "self" argument is assigned a location.
// CHECK: call void @llvm.dbg.declare(metadata %0** %{{[^,]+}}, metadata [[SELF:![0-9]*]], metadata !{{.*}})
-// CHECK: [[SELF]] = {{.*}} ; [ DW_TAG_arg_variable ] [self]
+// CHECK: [[SELF]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "self"
@interface Foo
-(void) Bar: (int)x ;
diff --git a/clang/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m b/clang/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m
index 3fb98c54da2..7cac8f1c7d7 100644
--- a/clang/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m
+++ b/clang/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m
@@ -7,7 +7,7 @@
@implementation Foo
-(int) barMethod {
-// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-1]]]
+ // CHECK: !MDSubprogram({{.*}}line: [[@LINE-1]]
int i = 0;
int j = 1;
int k = 1;
diff --git a/clang/test/CodeGenObjC/arc-linetable.m b/clang/test/CodeGenObjC/arc-linetable.m
index cd746d18c13..5a9eda992ee 100644
--- a/clang/test/CodeGenObjC/arc-linetable.m
+++ b/clang/test/CodeGenObjC/arc-linetable.m
@@ -54,7 +54,9 @@ typedef signed char BOOL;
@implementation AppDelegate : NSObject
-// CHECK: ![[TESTNOSIDEEFFECT:.*]] = {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+1]]] [local] [def] [-[AppDelegate testNoSideEffect:]]
+// CHECK: ![[TESTNOSIDEEFFECT:.*]] = !MDSubprogram(name: "-[AppDelegate testNoSideEffect:]"
+// CHECK-SAME: line: [[@LINE+2]]
+// CHECK-SAME: isLocal: true, isDefinition: true
- (int)testNoSideEffect:(NSString *)foo {
int x = 1;
return 1; // Return expression
diff --git a/clang/test/CodeGenObjC/block-byref-debuginfo.m b/clang/test/CodeGenObjC/block-byref-debuginfo.m
index 231767e99a6..dc8379bf852 100644
--- a/clang/test/CodeGenObjC/block-byref-debuginfo.m
+++ b/clang/test/CodeGenObjC/block-byref-debuginfo.m
@@ -3,7 +3,10 @@
// rdar://problem/14386148
// Test that the foo is aligned at an 8 byte boundary in the DWARF
// expression (256) that locates it inside of the byref descriptor:
-// CHECK: [ DW_TAG_member ] [foo] [line 0, size {{[0-9]+}}, align 64, offset 256] [from Foo]
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "foo",
+// CHECK-NOT: line:
+// CHECK-SAME: align: 64
+// CHECK-SAME: offset: 256
struct Foo {
unsigned char *data;
diff --git a/clang/test/CodeGenObjC/catch-lexical-block.m b/clang/test/CodeGenObjC/catch-lexical-block.m
index d5aeee143be..5ff184a91de 100644
--- a/clang/test/CodeGenObjC/catch-lexical-block.m
+++ b/clang/test/CodeGenObjC/catch-lexical-block.m
@@ -9,7 +9,7 @@ void f0() {
// We should have 3 lexical blocks here at the moment, including one
// for the catch block.
-// CHECK: lexical_block
-// CHECK: auto_variable
-// CHECK: lexical_block
-// CHECK: lexical_block
+// CHECK: !MDLexicalBlock(
+// CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable
+// CHECK: !MDLexicalBlock(
+// CHECK: !MDLexicalBlock(
diff --git a/clang/test/CodeGenObjC/debug-info-block-captured-self.m b/clang/test/CodeGenObjC/debug-info-block-captured-self.m
index 70c948824a2..ccddbef5cef 100644
--- a/clang/test/CodeGenObjC/debug-info-block-captured-self.m
+++ b/clang/test/CodeGenObjC/debug-info-block-captured-self.m
@@ -63,7 +63,9 @@ typedef enum {
// make sure we are still in the same function
// CHECK: define {{.*}}__copy_helper_block_
// Metadata
-// CHECK: ![[MAIN:.*]] = !{!"0x13\00Main\0023\00{{.*}}", {{.*}} ; [ DW_TAG_structure_type ] [Main] [line 23,
-// CHECK: ![[PMAIN:.*]] = {{.*}}![[MAIN]]} ; [ DW_TAG_pointer_type ]{{.*}}from Main
-// CHECK: ![[BDMD]] = {{.*}}.block_descriptor
-// CHECK: ![[SELF]] = {{.*}}![[PMAIN]]{{.*}}[ DW_TAG_auto_variable ] [self] [line 40]
+// CHECK: ![[MAIN:.*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "Main"
+// CHECK-SAME: line: 23,
+// CHECK: ![[PMAIN:.*]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: ![[MAIN]],
+// CHECK: ![[BDMD]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: ".block_descriptor"
+// CHECK: ![[SELF]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "self"
+// CHECK-SAME: line: 40,
diff --git a/clang/test/CodeGenObjC/debug-info-block-helper.m b/clang/test/CodeGenObjC/debug-info-block-helper.m
index 1403327dcb4..dc57c689779 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-runtime=macosx-fragile-10.5 %s -o - | FileCheck %s
extern void foo(void(^)(void));
-// CHECK: [ DW_TAG_subprogram ] {{.*}} [__destroy_helper_block_]
+// CHECK: !MDSubprogram(name: "__destroy_helper_block_"
@interface NSObject {
struct objc_object *isa;
diff --git a/clang/test/CodeGenObjC/debug-info-block-type.m b/clang/test/CodeGenObjC/debug-info-block-type.m
index ef92bf35152..018c4c6e2e1 100644
--- a/clang/test/CodeGenObjC/debug-info-block-type.m
+++ b/clang/test/CodeGenObjC/debug-info-block-type.m
@@ -1,18 +1,23 @@
// RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin14 -x objective-c < %s -o - | FileCheck %s
#define nil ((void*) 0)
typedef signed char BOOL;
-// CHECK: ![[BOOL:[0-9]+]] = {{.*}} [ DW_TAG_typedef ] [BOOL] [line [[@LINE-1]]
-// CHECK: ![[ID:[0-9]+]] = {{.*}} [ DW_TAG_typedef ] [id]
+// CHECK: ![[BOOL:[0-9]+]] = !MDDerivedType(tag: DW_TAG_typedef, name: "BOOL"
+// CHECK-SAME: line: [[@LINE-2]]
+// CHECK: ![[ID:[0-9]+]] = !MDDerivedType(tag: DW_TAG_typedef, name: "id"
typedef BOOL (^SomeKindOfPredicate)(id obj);
-// CHECK: ![[PTR:[0-9]+]]} ; [ DW_TAG_member ] [__FuncPtr]
-// CHECK: ![[PTR]] = {{.*}}, ![[FNTYPE:[0-9]+]]} ; [ DW_TAG_pointer_type ]
-// CHECK: ![[FNTYPE]] = {{.*}} ![[ARGS:[0-9]+]]{{.*}} ; [ DW_TAG_subroutine_type ]
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "__FuncPtr"
+// CHECK-SAME: baseType: ![[PTR:[0-9]+]]
+// CHECK: ![[PTR]] = !MDDerivedType(tag: DW_TAG_pointer_type,
+// CHECK-SAME: baseType: ![[FNTYPE:[0-9]+]]
+// CHECK: ![[FNTYPE]] = !MDSubroutineType(types: ![[ARGS:[0-9]+]])
// CHECK: ![[ARGS]] = !{![[BOOL]], ![[ID]]}
int main()
{
SomeKindOfPredicate p = ^BOOL(id obj) { return obj != nil; };
- // CHECK: ![[PTR]]} ; [ DW_TAG_member ] [__FuncPtr] [line [[@LINE-1]], size 64, align 64, offset 128]
+ // CHECK: !MDDerivedType(tag: DW_TAG_member, name: "__FuncPtr",
+ // CHECK-SAME: line: [[@LINE-2]]
+ // CHECK-SAME: size: 64, align: 64, offset: 128,
return p(nil);
}
diff --git a/clang/test/CodeGenObjC/debug-info-blocks.m b/clang/test/CodeGenObjC/debug-info-blocks.m
index f5f4437b7b5..7e425f8b0a7 100644
--- a/clang/test/CodeGenObjC/debug-info-blocks.m
+++ b/clang/test/CodeGenObjC/debug-info-blocks.m
@@ -24,9 +24,9 @@
// CHECK-DAG: [[DBG_LINE]] = !MDLocation(line: 0, scope: ![[COPY_SP:[0-9]+]])
// CHECK-DAG: [[COPY_LINE]] = !MDLocation(line: 0, scope: ![[COPY_SP:[0-9]+]])
-// CHECK-DAG: [[COPY_SP]] = {{.*}}[ DW_TAG_subprogram ]{{.*}}[__copy_helper_block_]
+// CHECK-DAG: [[COPY_SP]] = !MDSubprogram(name: "__copy_helper_block_"
// CHECK-DAG: [[DESTROY_LINE]] = !MDLocation(line: 0, scope: ![[DESTROY_SP:[0-9]+]])
-// CHECK-DAG: [[DESTROY_SP]] = {{.*}}[ DW_TAG_subprogram ]{{.*}}[__destroy_helper_block_]
+// CHECK-DAG: [[DESTROY_SP]] = !MDSubprogram(name: "__destroy_helper_block_"
typedef unsigned int NSUInteger;
@protocol NSObject
@@ -61,8 +61,8 @@ static void run(void (^block)(void))
{
if ((self = [super init])) {
run(^{
- // CHECK-DAG: ![[SELF]] = {{.*}} [ DW_TAG_auto_variable ] [self] [line [[@LINE+4]]]
- // CHECK-DAG: ![[D]] = {{.*}} [d] [line [[@LINE+1]]]
+ // CHECK-DAG: ![[SELF]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "self"{{.*}}, line: [[@LINE+4]],
+ // CHECK-DAG: ![[D]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "d"{{.*}}, line: [[@LINE+1]],
NSMutableDictionary *d = [[NSMutableDictionary alloc] init];
ivar = 42 + (int)[d count];
});
diff --git a/clang/test/CodeGenObjC/debug-info-fwddecl.m b/clang/test/CodeGenObjC/debug-info-fwddecl.m
index b43d7c0eb87..8291d47b09b 100644
--- a/clang/test/CodeGenObjC/debug-info-fwddecl.m
+++ b/clang/test/CodeGenObjC/debug-info-fwddecl.m
@@ -2,4 +2,9 @@
@class ForwardObjcClass;
ForwardObjcClass *ptr = 0;
-// CHECK: {{.*}} [ DW_TAG_structure_type ] [ForwardObjcClass] [line 2, size 0, align 0, offset 0] [decl]
+// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "ForwardObjcClass"
+// CHECK-SAME: line: 2
+// CHECK-NOT: size:
+// CHECK-NOT: align:
+// CHECK-NOT: offset:
+// CHECK-SAME: flags: DIFlagFwdDecl
diff --git a/clang/test/CodeGenObjC/debug-info-getter-name.m b/clang/test/CodeGenObjC/debug-info-getter-name.m
index 9e1e55f0f40..5fd022e07af 100644
--- a/clang/test/CodeGenObjC/debug-info-getter-name.m
+++ b/clang/test/CodeGenObjC/debug-info-getter-name.m
@@ -1,7 +1,7 @@
// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -fexceptions -fobjc-exceptions -g %s -o - | FileCheck %s
-// CHECK: !"0x2e\00-[InstanceVariablesEverywhereButTheInterface someString]\00{{.*}}", {{.*}} ; [ DW_TAG_subprogram ]
+// CHECK: !MDSubprogram(name: "-[InstanceVariablesEverywhereButTheInterface someString]"
//rdar: //8498026
diff --git a/clang/test/CodeGenObjC/debug-info-id-with-protocol.m b/clang/test/CodeGenObjC/debug-info-id-with-protocol.m
index 9233f6ccc85..c3b88d77623 100644
--- a/clang/test/CodeGenObjC/debug-info-id-with-protocol.m
+++ b/clang/test/CodeGenObjC/debug-info-id-with-protocol.m
@@ -36,7 +36,12 @@ int main()
}
}
// Verify that the debug type for both variables is 'id'.
-// CHECK: !"0x101\00bad_carrier\00{{[0-9]+}}\000", !{{[0-9]+}}, null, ![[IDTYPE:[0-9]+]]} ; [ DW_TAG_arg_variable ] [bad_carrier] [line 0]
+// CHECK: ![[IDTYPE:[0-9]+]] = !MDDerivedType(tag: DW_TAG_typedef, name: "id"
//
-// CHECK: !"0x101\00good_carrier\00{{[0-9]+}}\000", !{{[0-9]+}}, null, ![[IDTYPE]]} ; [ DW_TAG_arg_variable ] [good_carrier] [line 0]
-// CHECK !{{.*}}[[IDTYPE]] = !{!"0x16\00id\00{{[0-9]+}}\000\000\000\000", null, !{{[0-9]+}}, !{{[0-9]+}}} ; [ DW_TAG_typedef ] [id]
+// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "bad_carrier"
+// CHECK-NOT: line:
+// CHECK-SAME: type: ![[IDTYPE]]
+//
+// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "good_carrier"
+// CHECK-NOT: line:
+// CHECK-SAME: type: ![[IDTYPE]]
diff --git a/clang/test/CodeGenObjC/debug-info-impl.m b/clang/test/CodeGenObjC/debug-info-impl.m
index 8991a88962d..4e56988d61c 100644
--- a/clang/test/CodeGenObjC/debug-info-impl.m
+++ b/clang/test/CodeGenObjC/debug-info-impl.m
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -S -emit-llvm %s -o - | FileCheck %s
-// CHECK: {{.*}} [ DW_TAG_structure_type ] [Circle] [line 11,
@interface NSObject {
struct objc_object *isa;
}
@@ -8,6 +7,8 @@
@interface Shape : NSObject
@end
+// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "Circle"
+// CHECK-SAME: line: [[@LINE+1]],
@interface Circle : Shape
@end
diff --git a/clang/test/CodeGenObjC/debug-info-instancetype.m b/clang/test/CodeGenObjC/debug-info-instancetype.m
index 07fd5ca00b1..a0553671887 100644
--- a/clang/test/CodeGenObjC/debug-info-instancetype.m
+++ b/clang/test/CodeGenObjC/debug-info-instancetype.m
@@ -13,11 +13,14 @@
@implementation Foo
+(instancetype)defaultFoo {return 0;}
-// CHECK: ![[FOO:[0-9]+]] = {{.*}}; [ DW_TAG_structure_type ] [Foo]
-// CHECK: !"0x2e\00+[Foo defaultFoo]\00+[Foo defaultFoo]\00\00[[@LINE-2]]\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[TYPE:[0-9]+]]
-// CHECK: ![[TYPE]] = {{.*}} ![[RESULT:[0-9]+]], null, null, null} ; [ DW_TAG_subroutine_type ]
-// CHECK: ![[RESULT]] = {{.*}}{![[FOOPTR:[0-9]+]],
-// CHECK: ![[FOOPTR]] = {{.*}}, ![[FOO]]}{{.*}}[ DW_TAG_pointer_type ] {{.*}} [from Foo]
+// CHECK: ![[FOO:[0-9]+]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "Foo"
+// CHECK: !MDSubprogram(name: "+[Foo defaultFoo]"
+// CHECK-SAME: line: [[@LINE-3]]
+// CHECK-SAME: type: ![[TYPE:[0-9]+]]
+// CHECK: ![[TYPE]] = !MDSubroutineType(types: ![[RESULT:[0-9]+]])
+// CHECK: ![[RESULT]] = !{![[FOOPTR:[0-9]+]],
+// CHECK: ![[FOOPTR]] = !MDDerivedType(tag: DW_TAG_pointer_type
+// CHECK-SAME: baseType: ![[FOO]]
@end
diff --git a/clang/test/CodeGenObjC/debug-info-ivars-extension.m b/clang/test/CodeGenObjC/debug-info-ivars-extension.m
index 9dd71522527..187a6df219e 100644
--- a/clang/test/CodeGenObjC/debug-info-ivars-extension.m
+++ b/clang/test/CodeGenObjC/debug-info-ivars-extension.m
@@ -24,10 +24,24 @@ void gorf (I* pg) {
int _b = pg->b;
}
-// CHECK: {{.*}} [ DW_TAG_structure_type ] [I]
+// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "I"
+
// Check for "a".
-// CHECK: {{.*}} [ DW_TAG_member ] [a] [line 7, size 32, align 32, offset 0] [public] [from int]
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "a"
+// CHECK-SAME: line: 7
+// CHECK-SAME: baseType: ![[INT:[0-9]+]]
+// CHECK-SAME: size: 32, align: 32
+// CHECK-NOT: offset:
+// CHECK-SAME: flags: DIFlagPublic
+// CHECK: ![[INT]] = !MDBasicType(name: "int"
+
// Make sure we don't output the same type twice.
-// CHECK-NOT: {{.*}} [ DW_TAG_structure_type ] [I]
+// CHECK-NOT: !MDCompositeType(tag: DW_TAG_structure_type, name: "I"
+
// Check for "b".
-// CHECK: {{.*}} [ DW_TAG_member ] [b] [line 18, size 32, align 32, offset 0] [public] [from int]
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "b"
+// CHECK-SAME: line: 18
+// CHECK-SAME: baseType: ![[INT]]
+// CHECK-SAME: size: 32, align: 32
+// CHECK-NOT: offset:
+// CHECK-SAME: flags: DIFlagPublic
diff --git a/clang/test/CodeGenObjC/debug-info-ivars-indirect.m b/clang/test/CodeGenObjC/debug-info-ivars-indirect.m
index f9593d24dea..0ef350ab2e8 100644
--- a/clang/test/CodeGenObjC/debug-info-ivars-indirect.m
+++ b/clang/test/CodeGenObjC/debug-info-ivars-indirect.m
@@ -6,10 +6,10 @@
// This happens to be the order the members are emitted in... I'm assuming it's
// not meaningful/important, so if something causes the order to change, feel
// free to update the test to reflect the new order.
-// CHECK: ; [ DW_TAG_member ] [a]
-// CHECK: ; [ DW_TAG_member ] [d]
-// CHECK: ; [ DW_TAG_member ] [c]
-// CHECK: ; [ DW_TAG_member ] [b]
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "a"
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "d"
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "c"
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "b"
@interface I
{
diff --git a/clang/test/CodeGenObjC/debug-info-ivars-private.m b/clang/test/CodeGenObjC/debug-info-ivars-private.m
index 8505da17bbb..7fec4b5a646 100644
--- a/clang/test/CodeGenObjC/debug-info-ivars-private.m
+++ b/clang/test/CodeGenObjC/debug-info-ivars-private.m
@@ -32,5 +32,16 @@ __attribute((objc_root_class)) @interface NSObject {
}
@end
-// CHECK: {{.*}} [ DW_TAG_member ] [foo] [line 14, size 32, align 32, offset 0] [protected] [from int]
-// CHECK: {{.*}} [ DW_TAG_member ] [bar] [line 27, size 32, align 32, offset 0] [private] [from int]
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "foo"
+// CHECK-SAME: line: 14
+// CHECK-SAME: baseType: ![[INT:[0-9]+]]
+// CHECK-SAME: size: 32, align: 32,
+// CHECK-NOT: offset:
+// CHECK-SAME: flags: DIFlagProtected
+// CHECK: ![[INT]] = !MDBasicType(name: "int"
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "bar"
+// CHECK-SAME: line: 27
+// CHECK-SAME: baseType: ![[INT:[0-9]+]]
+// CHECK-SAME: size: 32, align: 32,
+// CHECK-NOT: offset:
+// CHECK-SAME: flags: DIFlagPrivate
diff --git a/clang/test/CodeGenObjC/debug-info-ivars.m b/clang/test/CodeGenObjC/debug-info-ivars.m
index a0f2963f5dc..a6d8886eec0 100644
--- a/clang/test/CodeGenObjC/debug-info-ivars.m
+++ b/clang/test/CodeGenObjC/debug-info-ivars.m
@@ -18,7 +18,27 @@ __attribute((objc_root_class)) @interface NSObject {
@implementation BaseClass
@end
-// CHECK: {{.*}} [ DW_TAG_member ] [i] [line 10, size 32, align 32, offset 0] [protected] [from int]
-// CHECK: {{.*}} [ DW_TAG_member ] [flag_1] [line 11, size 9, align 32, offset 0] [protected] [from unsigned int]
-// CHECK: {{.*}} [ DW_TAG_member ] [flag_2] [line 12, size 9, align 32, offset 1] [protected] [from unsigned int]
-// CHECK: {{.*}} [ DW_TAG_member ] [flag_3] [line 14, size 9, align 32, offset 3] [protected] [from unsigned int]
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "i"
+// CHECK-SAME: line: 10
+// CHECK-SAME: baseType: ![[INT:[0-9]+]]
+// CHECK-SAME: size: 32, align: 32,
+// CHECK-NOT: offset:
+// CHECK-SAME: flags: DIFlagProtected
+// CHECK: ![[INT]] = !MDBasicType(name: "int"
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "flag_1"
+// CHECK-SAME: line: 11
+// CHECK-SAME: baseType: ![[UNSIGNED:[0-9]+]]
+// CHECK-SAME: size: 9, align: 32,
+// CHECK-NOT: offset:
+// CHECK-SAME: flags: DIFlagProtected
+// CHECK: ![[UNSIGNED]] = !MDBasicType(name: "unsigned int"
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "flag_2"
+// CHECK-SAME: line: 12
+// CHECK-SAME: baseType: ![[UNSIGNED]]
+// CHECK-SAME: size: 9, align: 32, offset: 1,
+// CHECK-SAME: flags: DIFlagProtected
+// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "flag_3"
+// CHECK-SAME: line: 14
+// CHECK-SAME: baseType: ![[UNSIGNED]]
+// CHECK-SAME: size: 9, align: 32, offset: 3,
+// CHECK-SAME: flags: DIFlagProtected
diff --git a/clang/test/CodeGenObjC/debug-info-lifetime-crash.m b/clang/test/CodeGenObjC/debug-info-lifetime-crash.m
index e2e5d7e3b3b..67285ce0d6e 100644
--- a/clang/test/CodeGenObjC/debug-info-lifetime-crash.m
+++ b/clang/test/CodeGenObjC/debug-info-lifetime-crash.m
@@ -13,10 +13,14 @@
{
// The debug type for these two will be identical, because we do not
// actually emit the ownership qualifier.
- // CHECK-DAG: !"0x100\00weakSelf\00[[@LINE+1]]\000"{{, [^,]+, [^,]+}}, ![[SELFTY:[0-9]+]]} ; [ DW_TAG_auto_variable ] [weakSelf]
+ // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "weakSelf",
+ // CHECK-SAME: line: [[@LINE+2]]
+ // CHECK-SAME: type: ![[SELFTY:[0-9]+]]
__attribute__((objc_ownership(weak))) __typeof(self) weakSelf = self;
Block = [^{
- // CHECK-DAG: !"0x100\00strongSelf\00[[@LINE+1]]\000"{{, [^,]+, [^,]+}}, ![[SELFTY]]} ; [ DW_TAG_auto_variable ] [strongSelf]
+ // CHECK: !MDLocalVariable(tag: DW_TAG_auto_variable, name: "strongSelf",
+ // CHECK-SAME: line: [[@LINE+2]]
+ // CHECK-SAME: type: ![[SELFTY]]
__attribute__((objc_ownership(strong))) __typeof(self) strongSelf = weakSelf;
} copy];
}
diff --git a/clang/test/CodeGenObjC/debug-info-property-accessors.m b/clang/test/CodeGenObjC/debug-info-property-accessors.m
index 0c7f03e6fb5..01fbe58bdd3 100644
--- a/clang/test/CodeGenObjC/debug-info-property-accessors.m
+++ b/clang/test/CodeGenObjC/debug-info-property-accessors.m
@@ -5,7 +5,8 @@
// Ensure we emit the names of explicit/renamed accessors even if they
// are defined later in the implementation section.
//
-// CHECK: !"0x4200\00blah\00{{[0-9]+}}\00isBlah\00{{.*}}", {{.*}}} ; [ DW_TAG_APPLE_property ] [blah]
+// CHECK: !MDObjCProperty(name: "blah"
+// CHECK-SAME: getter: "isBlah"
@class NSString;
extern void NSLog(NSString *format, ...);
diff --git a/clang/test/CodeGenObjC/debug-info-property3.m b/clang/test/CodeGenObjC/debug-info-property3.m
index a6d8daf083b..1b9599865ec 100644
--- a/clang/test/CodeGenObjC/debug-info-property3.m
+++ b/clang/test/CodeGenObjC/debug-info-property3.m
@@ -1,7 +1,9 @@
// RUN: %clang_cc1 -S -emit-llvm -g %s -o - | FileCheck %s
-// CHECK: !"0x4200\00p1\005\00\00\002316", {{.*}}} ; [ DW_TAG_APPLE_property ]
@interface I1
+// CHECK: !MDObjCProperty(name: "p1"
+// CHECK-SAME: line: [[@LINE+2]]
+// CHECK-SAME: attributes: 2316
@property int p1;
@end
diff --git a/clang/test/CodeGenObjC/debug-info-pubtypes.m b/clang/test/CodeGenObjC/debug-info-pubtypes.m
index 845b946f889..dd30f6cb906 100644
--- a/clang/test/CodeGenObjC/debug-info-pubtypes.m
+++ b/clang/test/CodeGenObjC/debug-info-pubtypes.m
@@ -1,8 +1,8 @@
// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -emit-llvm %s -o - | FileCheck %s
-// CHECK: {{.*}} [ DW_TAG_structure_type ] [H] [line 6,
-
+// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "H"
+// CHECK-SAME: line: [[@LINE+1]],
@interface H
-(void) foo;
@end
diff --git a/clang/test/CodeGenObjC/debug-info-self.m b/clang/test/CodeGenObjC/debug-info-self.m
index a6e9daff916..58a753c32a1 100644
--- a/clang/test/CodeGenObjC/debug-info-self.m
+++ b/clang/test/CodeGenObjC/debug-info-self.m
@@ -14,6 +14,16 @@
}
@end
-// CHECK: !"0x101\00self\0016777216\001088", ![[CTOR:.*]], null, !{{.*}}} ; [ DW_TAG_arg_variable ] [self] [line 0]
-// CHECK: !"0x101\00_cmd\0033554432\0064", ![[CTOR]], null, !{{.*}}} ; [ DW_TAG_arg_variable ] [_cmd] [line 0]
-// CHECK: !"0x101\00myarg\0050331659\000", ![[CTOR]], !{{.*}}, !{{.*}}} ; [ DW_TAG_arg_variable ] [myarg] [line 11]
+// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "self", arg: 1,
+// CHECK-SAME: scope: ![[CTOR:[0-9]+]]
+// CHECK-NOT: line:
+// CHECK-SAME: flags: DIFlagArtificial | DIFlagObjectPointer{{[,)]}}
+// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "_cmd", arg: 2,
+// CHECK-SAME: scope: ![[CTOR]]
+// CHECK-NOT: line:
+// CHECK-SAME: flags: DIFlagArtificial{{[,)]}}
+// CHECK: !MDLocalVariable(tag: DW_TAG_arg_variable, name: "myarg", arg: 3,
+// CHECK-SAME: scope: ![[CTOR]]
+// CHECK-SAME: line: 11
+// CHECK-NOT: flags:
+// CHECK-SAME: ){{$}}
diff --git a/clang/test/CodeGenObjC/debug-info-static-var.m b/clang/test/CodeGenObjC/debug-info-static-var.m
index 6828983b083..ac615d89215 100644
--- a/clang/test/CodeGenObjC/debug-info-static-var.m
+++ b/clang/test/CodeGenObjC/debug-info-static-var.m
@@ -2,7 +2,9 @@
// Radar 8801045
// Do not emit AT_MIPS_linkage_name for static variable i
-// CHECK: !"0x34\00i\00i\00\00{{.*}}"
+// CHECK: !MDGlobalVariable(name: "i"
+// CHECK-NOT: linkageName:
+// CHECK-SAME: ){{$}}
@interface A {
}
diff --git a/clang/test/CodeGenObjC/debug-info-synthesis.m b/clang/test/CodeGenObjC/debug-info-synthesis.m
index 55867b4068a..ad9bea762a1 100644
--- a/clang/test/CodeGenObjC/debug-info-synthesis.m
+++ b/clang/test/CodeGenObjC/debug-info-synthesis.m
@@ -30,5 +30,8 @@ int main(int argc, char *argv[]) {
}
}
-// CHECK: ![[FILE:.*]] = {{.*}}[ DW_TAG_file_type ] [{{.*}}/foo.h]
-// CHECK: ![[FILE]], {{.*}} ; [ DW_TAG_subprogram ] [line 8] [local] [def] [-[Foo dict]]
+// CHECK: ![[FILE:.*]] = !MDFile(filename: "{{[^"]+}}foo.h"
+// CHECK: !MDSubprogram(name: "-[Foo setDict:]"
+// CHECK-SAME: file: ![[FILE]],
+// CHECK-SAME: line: 8,
+// CHECK-SAME: isLocal: true, isDefinition: true
diff --git a/clang/test/CodeGenObjC/debug-info-variadic-method.m b/clang/test/CodeGenObjC/debug-info-variadic-method.m
index e895953ff6b..7f9ad276c81 100644
--- a/clang/test/CodeGenObjC/debug-info-variadic-method.m
+++ b/clang/test/CodeGenObjC/debug-info-variadic-method.m
@@ -10,7 +10,7 @@
@implementation Foo
- (void) Bar: (int) n, ...
{
- // CHECK: ![[NUM:[^,]*]], null, null, null} ; [ DW_TAG_subroutine_type ]
- // CHECK: ![[NUM]] = {{!{null, ![^,]*, ![^,]*, ![^,]*, null}}}
+ // CHECK: !MDSubroutineType(types: ![[NUM:[0-9]+]])
+ // CHECK: ![[NUM]] = {{!{null, ![^,]*, ![^,]*, ![^,]*, null}}}
}
@end
diff --git a/clang/test/CodeGenObjC/debug-property-synth.m b/clang/test/CodeGenObjC/debug-property-synth.m
index 14657249c00..37ff11f51ae 100644
--- a/clang/test/CodeGenObjC/debug-property-synth.m
+++ b/clang/test/CodeGenObjC/debug-property-synth.m
@@ -18,8 +18,8 @@
// CHECK-NOT: ret
// CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]]
//
-// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+4]]] [local] [def] [-[I p1]]
-// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+3]]] [local] [def] [-[I setP1:]]
+// CHECK: !MDSubprogram(name: "-[I p1]",{{.*}} line: [[@LINE+4]],{{.*}} isLocal: true, isDefinition: true
+// CHECK: !MDSubprogram(name: "-[I setP1:]",{{.*}} line: [[@LINE+3]],{{.*}} isLocal: true, isDefinition: true
// CHECK: ![[DBG1]] = !MDLocation(line: [[@LINE+2]],
// CHECK: ![[DBG2]] = !MDLocation(line: [[@LINE+1]],
@property int p1;
diff --git a/clang/test/CodeGenObjC/debuginfo-properties.m b/clang/test/CodeGenObjC/debuginfo-properties.m
index 9a357145830..707d234b741 100644
--- a/clang/test/CodeGenObjC/debuginfo-properties.m
+++ b/clang/test/CodeGenObjC/debuginfo-properties.m
@@ -11,10 +11,19 @@
@protocol HasASelection <NSObject>
@property (nonatomic, retain) Selection* selection;
-// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-1]]] [local] [def] [-[MyClass selection]]
-// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-2]]] [local] [def] [-[MyClass setSelection:]]
-// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-3]]] [local] [def] [-[OtherClass selection]]
-// CHECK: [ DW_TAG_subprogram ] [line [[@LINE-4]]] [local] [def] [-[OtherClass setSelection:]]
+// CHECK: !MDSubprogram(name: "-[MyClass selection]"
+// CHECK-SAME: line: [[@LINE-2]]
+// CHECK-SAME: isLocal: true, isDefinition: true
+// CHECK: !MDSubprogram(name: "-[MyClass setSelection:]"
+// CHECK-SAME: line: [[@LINE-5]]
+// CHECK-SAME: isLocal: true, isDefinition: true
+// CHECK: !MDSubprogram(name: "-[OtherClass selection]"
+// CHECK-SAME: line: [[@LINE-8]]
+// CHECK-SAME: isLocal: true, isDefinition: true
+// CHECK: !MDSubprogram(name: "-[OtherClass setSelection:]"
+// CHECK-SAME: line: [[@LINE-11]]
+// CHECK-SAME: isLocal: true, isDefinition: true
+
@end
@interface MyClass : NSObject <HasASelection> {
diff --git a/clang/test/CodeGenObjC/objc-fixed-enum.m b/clang/test/CodeGenObjC/objc-fixed-enum.m
index eff317cdc51..dbac91df840 100644
--- a/clang/test/CodeGenObjC/objc-fixed-enum.m
+++ b/clang/test/CodeGenObjC/objc-fixed-enum.m
@@ -46,19 +46,35 @@ int main() {
// -treated as C++11 strongly typed enums.
return e0 != e1 && e1 == e2 && e2 == e3;
}
-// CHECK: ![[ENUMERATOR0:[0-9]+]] = {{.*}}; [ DW_TAG_enumeration_type ] [line 10
-// CHECK: ![[ENUMERATOR1:[0-9]+]] = {{.*}}; [ DW_TAG_enumeration_type ] [Enum1] [line 16{{.*}}] [from NSInteger]
-// CHECK: ![[ENUMERATOR3:[0-9]+]] = {{.*}}; [ DW_TAG_typedef ] [NSInteger] [line 6{{.*}}] [from long int]
-// CHECK: ![[ENUMERATOR2:[0-9]+]] = {{.*}}; [ DW_TAG_enumeration_type ] [line 22{{.*}}] [from NSInteger]
+// CHECK: ![[ENUMERATOR0:[0-9]+]] = !MDCompositeType(tag: DW_TAG_enumeration_type
+// CHECK-SAME: line: 10,
+// CHECK: ![[ENUMERATOR1:[0-9]+]] = !MDCompositeType(tag: DW_TAG_enumeration_type, name: "Enum1"
+// CHECK-SAME: line: 16
+// CHECK-SAME: baseType: ![[ENUMERATOR3:[0-9]+]]
+// CHECK: ![[ENUMERATOR3]] = !MDDerivedType(tag: DW_TAG_typedef, name: "NSInteger"
+// CHECK-SAME: line: 6
+// CHECK-SAME: baseType: ![[LONGINT:[0-9]+]]
+// CHECK: ![[LONGINT]] = !MDBasicType(name: "long int"
+// CHECK: ![[ENUMERATOR2:[0-9]+]] = !MDCompositeType(tag: DW_TAG_enumeration_type,
+// CHECK-SAME: line: 22
+// CHECK-SAME: baseType: ![[ENUMERATOR3]]
-// CHECK: ![[ENUM0]] = !{!"0x100\00e0\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[TYPE0:[0-9]+]]} ; [ DW_TAG_auto_variable ]
-// CHECK: ![[TYPE0]] = !{!"0x16\00Enum0\00{{.*}}", {{.*}}, ![[ENUMERATOR0]]} ; [ DW_TAG_typedef ] [Enum0]
+// CHECK: ![[ENUM0]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e0"
+// CHECK-SAME: type: ![[TYPE0:[0-9]+]]
+// CHECK: ![[TYPE0]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum0",
+// CHECK-SAME: baseType: ![[ENUMERATOR0]]
-// CHECK: ![[ENUM1]] = !{!"0x100\00e1\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[TYPE1:[0-9]+]]} ; [ DW_TAG_auto_variable ]
-// CHECK: ![[TYPE1]] = !{!"0x16\00Enum1\00{{.*}}", {{.*}}, ![[ENUMERATOR1]]} ; [ DW_TAG_typedef ] [Enum1]
+// CHECK: ![[ENUM1]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e1"
+// CHECK-SAME: type: ![[TYPE1:[0-9]+]]
+// CHECK: ![[TYPE1]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum1"
+// CHECK-SAME: baseType: ![[ENUMERATOR1]]
-// CHECK: ![[ENUM2]] = !{!"0x100\00e2\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[TYPE2:[0-9]+]]} ; [ DW_TAG_auto_variable ]
-// CHECK: ![[TYPE2]] = !{!"0x16\00Enum2\00{{.*}}", {{.*}}, ![[ENUMERATOR2]]} ; [ DW_TAG_typedef ] [Enum2]
+// CHECK: ![[ENUM2]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e2"
+// CHECK-SAME: type: ![[TYPE2:[0-9]+]]
+// CHECK: ![[TYPE2]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum2"
+// CHECK-SAME: baseType: ![[ENUMERATOR2]]
-// CHECK: ![[ENUM3]] = !{!"0x100\00e3\00{{[^,]*}}"{{, [^,]+, [^,]+}}, ![[TYPE3:[0-9]+]]} ; [ DW_TAG_auto_variable ]
-// CHECK: ![[TYPE3]] = !{!"0x16\00Enum3\00{{.*}}", {{.*}}, ![[ENUMERATOR3]]} ; [ DW_TAG_typedef ] [Enum3]
+// CHECK: ![[ENUM3]] = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "e3"
+// CHECK-SAME: type: ![[TYPE3:[0-9]+]]
+// CHECK: ![[TYPE3]] = !MDDerivedType(tag: DW_TAG_typedef, name: "Enum3"
+// CHECK-SAME: baseType: ![[ENUMERATOR3]]
OpenPOWER on IntegriCloud