mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-09 07:09:01 +00:00
IR: Move MDLocation into place (clang testcases)
Update testcases to match LLVM change in r226048. llvm-svn: 226049
This commit is contained in:
parent
9885469922
commit
8d3ef611ce
@ -6,5 +6,5 @@ void foo() {
|
|||||||
int p = 0; // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
|
int p = 0; // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
|
||||||
}
|
}
|
||||||
// Now match the line number records:
|
// Now match the line number records:
|
||||||
// CHECK: {{^}}[[variable_l]]{{ = !{i32 5,}}
|
// CHECK: {{^}}[[variable_l]] = !MDLocation(line: 5,
|
||||||
// CHECK: {{^}}[[variable_p]]{{ = !{i32 6,}}
|
// CHECK: {{^}}[[variable_p]] = !MDLocation(line: 6,
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// CHECK: [[ASSIGNMENT]] = !{i32 [[@LINE+2]],
|
// CHECK: [[ASSIGNMENT]] = !MDLocation(line: [[@LINE+2]],
|
||||||
// CHECK: [[BLOCK_ENTRY]] = !{i32 [[@LINE+1]],
|
// CHECK: [[BLOCK_ENTRY]] = !MDLocation(line: [[@LINE+1]],
|
||||||
int (^blockptr)(void) = ^(void) {
|
int (^blockptr)(void) = ^(void) {
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
@ -13,4 +13,4 @@ void func(char c, char* d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: ret void, !dbg [[LINE:.*]]
|
// CHECK: ret void, !dbg [[LINE:.*]]
|
||||||
// CHECK: [[LINE]] = !{i32 6,
|
// CHECK: [[LINE]] = !MDLocation(line: 6,
|
||||||
|
@ -8,4 +8,4 @@ int foo(int a, int b) { int c = a + b;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Without column information we wouldn't change locations for b.
|
// Without column information we wouldn't change locations for b.
|
||||||
// CHECK: i32 4, i32 20,
|
// CHECK: !MDLocation(line: 4, column: 20,
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
// CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]
|
// CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]
|
||||||
// CHECK: [[F1:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f1]
|
// CHECK: [[F1:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f1]
|
||||||
// CHECK: [[F2:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f2]
|
// CHECK: [[F2:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f2]
|
||||||
// CHECK: [[F1_LINE]] = {{.*}}, [[F1]], null}
|
// CHECK: [[F1_LINE]] = !MDLocation({{.*}}, scope: [[F1]])
|
||||||
// CHECK: [[F2_LINE]] = {{.*}}, [[F2]], null}
|
// CHECK: [[F2_LINE]] = !MDLocation({{.*}}, scope: [[F2]])
|
||||||
|
|
||||||
void f1() {
|
void f1() {
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
void foo(char c)
|
void foo(char c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
// CHECK: ![[CONV]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[CONV]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
i = c;
|
i = c;
|
||||||
// CHECK: ![[RET]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ extern bool b;
|
|||||||
// CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]]
|
// CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]]
|
||||||
// CHECK: [[FUN1:.*]] = {{.*}}; [ DW_TAG_subprogram ] {{.*}} [def] [fun1]
|
// CHECK: [[FUN1:.*]] = {{.*}}; [ DW_TAG_subprogram ] {{.*}} [def] [fun1]
|
||||||
// CHECK: [[FUN2:.*]] = {{.*}}; [ DW_TAG_subprogram ] {{.*}} [def] [fun2]
|
// CHECK: [[FUN2:.*]] = {{.*}}; [ DW_TAG_subprogram ] {{.*}} [def] [fun2]
|
||||||
// CHECK: [[DTOR_CALL1_LOC]] = !{i32 [[@LINE+1]], i32 0, [[FUN1]], null}
|
// CHECK: [[DTOR_CALL1_LOC]] = !MDLocation(line: [[@LINE+1]], scope: [[FUN1]])
|
||||||
void fun1() { b && (C(), 1); }
|
void fun1() { b && (C(), 1); }
|
||||||
// CHECK: [[DTOR_CALL2_LOC]] = !{i32 [[@LINE+1]], i32 0, [[FUN2]], null}
|
// CHECK: [[DTOR_CALL2_LOC]] = !MDLocation(line: [[@LINE+1]], scope: [[FUN2]])
|
||||||
bool fun2() { return (C(), b) && 0; }
|
bool fun2() { return (C(), b) && 0; }
|
||||||
|
@ -118,5 +118,5 @@ int main(int argc, char **argv) {
|
|||||||
// CHECK: !"_ZTS1D", {{.*}}, [[D_FUNC_DECL:![0-9]*]], {{![0-9]*}}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func]
|
// CHECK: !"_ZTS1D", {{.*}}, [[D_FUNC_DECL:![0-9]*]], {{![0-9]*}}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func]
|
||||||
// CHECK: [[D_FUNC_DECL]] = !{!"0x2e\00func\00{{.*}}\000\00{{[0-9]+}}"{{.*}}, !"_ZTS1D", {{.*}}, null} ; [ DW_TAG_subprogram ] {{.*}} [func]
|
// CHECK: [[D_FUNC_DECL]] = !{!"0x2e\00func\00{{.*}}\000\00{{[0-9]+}}"{{.*}}, !"_ZTS1D", {{.*}}, null} ; [ DW_TAG_subprogram ] {{.*}} [func]
|
||||||
|
|
||||||
// CHECK: ![[EXCEPTLOC]] = !{i32 84,
|
// CHECK: ![[EXCEPTLOC]] = !MDLocation(line: 84,
|
||||||
// CHECK: ![[RETLOC]] = !{i32 83,
|
// CHECK: ![[RETLOC]] = !MDLocation(line: 83,
|
||||||
|
@ -34,5 +34,5 @@ int main(void) {}
|
|||||||
// CHECK-NOT: __cxx_global_var_init
|
// CHECK-NOT: __cxx_global_var_init
|
||||||
// CHECK: store i32 %[[C2]], i32* @_ZL1k, align 4, !dbg
|
// CHECK: store i32 %[[C2]], i32* @_ZL1k, align 4, !dbg
|
||||||
//
|
//
|
||||||
// CHECK: ![[LINE]] = !{i32 13, i32
|
// CHECK: ![[LINE]] = !MDLocation(line: 13,
|
||||||
// CHECK: ![[LINE2]] = !{i32 15, i32
|
// CHECK: ![[LINE2]] = !MDLocation(line: 15,
|
||||||
|
@ -48,8 +48,8 @@ int main() {
|
|||||||
// CHECK: br label
|
// CHECK: br label
|
||||||
// CHECK: br label {{.*}}, !dbg [[DBG4:!.*]]
|
// CHECK: br label {{.*}}, !dbg [[DBG4:!.*]]
|
||||||
|
|
||||||
// CHECK: [[DBG1]] = !{i32 100, i32 0, !{{.*}}, null}
|
// CHECK: [[DBG1]] = !MDLocation(line: 100, scope: !{{.*}})
|
||||||
// CHECK: [[DBG2]] = !{i32 200, i32 0, !{{.*}}, null}
|
// CHECK: [[DBG2]] = !MDLocation(line: 200, scope: !{{.*}})
|
||||||
// CHECK: [[DBG3]] = !{i32 300, i32 0, !{{.*}}, null}
|
// CHECK: [[DBG3]] = !MDLocation(line: 300, scope: !{{.*}})
|
||||||
// CHECK: [[DBG4]] = !{i32 401, i32 0, !{{.*}}, null}
|
// CHECK: [[DBG4]] = !MDLocation(line: 401, scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
@ -166,22 +166,22 @@ void f13() {
|
|||||||
F13_IMPL;
|
F13_IMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK: [[DBG_F1]] = !{i32 100,
|
// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
|
||||||
// CHECK: [[DBG_FOO_VALUE]] = !{i32 200,
|
// CHECK: [[DBG_FOO_VALUE]] = !MDLocation(line: 200,
|
||||||
// CHECK: [[DBG_FOO_REF]] = !{i32 202,
|
// CHECK: [[DBG_FOO_REF]] = !MDLocation(line: 202,
|
||||||
// CHECK: [[DBG_FOO_COMPLEX]] = !{i32 204,
|
// CHECK: [[DBG_FOO_COMPLEX]] = !MDLocation(line: 204,
|
||||||
// CHECK: [[DBG_F2]] = !{i32 300,
|
// CHECK: [[DBG_F2]] = !MDLocation(line: 300,
|
||||||
// CHECK: [[DBG_F3]] = !{i32 400,
|
// CHECK: [[DBG_F3]] = !MDLocation(line: 400,
|
||||||
// CHECK: [[DBG_F4]] = !{i32 500,
|
// CHECK: [[DBG_F4]] = !MDLocation(line: 500,
|
||||||
// CHECK: [[DBG_F5]] = !{i32 600,
|
// CHECK: [[DBG_F5]] = !MDLocation(line: 600,
|
||||||
// CHECK: [[DBG_F6]] = !{i32 700,
|
// CHECK: [[DBG_F6]] = !MDLocation(line: 700,
|
||||||
// CHECK: [[DBG_F7]] = !{i32 800,
|
// CHECK: [[DBG_F7]] = !MDLocation(line: 800,
|
||||||
// CHECK: [[DBG_F8]] = !{i32 900,
|
// CHECK: [[DBG_F8]] = !MDLocation(line: 900,
|
||||||
// CHECK: [[DBG_F9]] = !{i32 1000,
|
// CHECK: [[DBG_F9]] = !MDLocation(line: 1000,
|
||||||
// CHECK: [[DBG_F10_ICMP]] = !{i32 1100,
|
// CHECK: [[DBG_F10_ICMP]] = !MDLocation(line: 1100,
|
||||||
// CHECK: [[DBG_F10_STORE]] = !{i32 1100,
|
// CHECK: [[DBG_F10_STORE]] = !MDLocation(line: 1100,
|
||||||
// CHECK: [[DBG_GLBL_CTOR_B]] = !{i32 1500,
|
// CHECK: [[DBG_GLBL_CTOR_B]] = !MDLocation(line: 1500,
|
||||||
// CHECK: [[DBG_GLBL_DTOR_B]] = !{i32 1500,
|
// CHECK: [[DBG_GLBL_DTOR_B]] = !MDLocation(line: 1500,
|
||||||
// CHECK: [[DBG_F11]] = !{i32 1200,
|
// CHECK: [[DBG_F11]] = !MDLocation(line: 1200,
|
||||||
// CHECK: [[DBG_F12]] = !{i32 1300,
|
// CHECK: [[DBG_F12]] = !MDLocation(line: 1300,
|
||||||
// CHECK: [[DBG_F13]] = !{i32 1400,
|
// CHECK: [[DBG_F13]] = !MDLocation(line: 1400,
|
||||||
|
@ -19,4 +19,4 @@ template struct AB<int>;
|
|||||||
// CHECK-LABEL: define
|
// CHECK-LABEL: define
|
||||||
|
|
||||||
// CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = {{.*}} @"\01??_E?$AB@H@@W3AEPAXI@Z", {{.*}}; [ DW_TAG_subprogram ]
|
// CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = {{.*}} @"\01??_E?$AB@H@@W3AEPAXI@Z", {{.*}}; [ DW_TAG_subprogram ]
|
||||||
// CHECK: [[THUNK_LOC]] = !{i32 15, i32 0, [[THUNK_VEC_DEL_DTOR]], null}
|
// CHECK: [[THUNK_LOC]] = !MDLocation(line: 15, scope: [[THUNK_VEC_DEL_DTOR]])
|
||||||
|
@ -19,4 +19,4 @@ void foo() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Check there is a line number entry for line 19 where b1 is destructed.
|
// Check there is a line number entry for line 19 where b1 is destructed.
|
||||||
// CHECK: !{i32 19, i32 0, !
|
// CHECK: !MDLocation(line: 19,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
|
// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
|
||||||
// CHECK: !dbg ![[DBG:.*]]
|
// CHECK: !dbg ![[DBG:.*]]
|
||||||
// CHECK: !"0x2e\00\00\00_GLOBAL__sub_I_globalinit_loc.cpp\000\00{{.*}}\000", {{.*}} ; [ DW_TAG_subprogram ] [line 0] [local] [def]
|
// CHECK: !"0x2e\00\00\00_GLOBAL__sub_I_globalinit_loc.cpp\000\00{{.*}}\000", {{.*}} ; [ DW_TAG_subprogram ] [line 0] [local] [def]
|
||||||
// CHECK: ![[DBG]] = !{i32 0, i32 0,
|
// CHECK: ![[DBG]] = !MDLocation(line: 0,
|
||||||
# 99 "someheader.h"
|
# 99 "someheader.h"
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
|
@ -24,15 +24,15 @@ int foo()
|
|||||||
C c;
|
C c;
|
||||||
c.i = 42;
|
c.i = 42;
|
||||||
// This breakpoint should be at/before the cleanup code.
|
// This breakpoint should be at/before the cleanup code.
|
||||||
// CHECK: ![[CLEANUP]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[CLEANUP]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return 0;
|
return 0;
|
||||||
// CHECK: ![[RET]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
|
||||||
void bar()
|
void bar()
|
||||||
{
|
{
|
||||||
if (!foo())
|
if (!foo())
|
||||||
// CHECK: {{.*}} = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: {{.*}} = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (foo()) {
|
if (foo()) {
|
||||||
@ -40,21 +40,21 @@ void bar()
|
|||||||
c.i = foo();
|
c.i = foo();
|
||||||
}
|
}
|
||||||
// Clang creates only a single ret instruction. Make sure it is at a useful line.
|
// Clang creates only a single ret instruction. Make sure it is at a useful line.
|
||||||
// CHECK: ![[RETBAR]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RETBAR]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
|
||||||
void baz()
|
void baz()
|
||||||
{
|
{
|
||||||
if (!foo())
|
if (!foo())
|
||||||
// CHECK: ![[SCOPE1:.*]] = !{!"0xb\00[[@LINE-1]]\00{{.*}}", {{.*}} ; [ DW_TAG_lexical_block ]
|
// CHECK: ![[SCOPE1:.*]] = !{!"0xb\00[[@LINE-1]]\00{{.*}}", {{.*}} ; [ DW_TAG_lexical_block ]
|
||||||
// CHECK: {{.*}} = !{i32 [[@LINE+1]], i32 0, ![[SCOPE1]], null}
|
// CHECK: {{.*}} = !MDLocation(line: [[@LINE+1]], scope: ![[SCOPE1]])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (foo()) {
|
if (foo()) {
|
||||||
// no cleanup
|
// no cleanup
|
||||||
// CHECK: {{.*}} = !{i32 [[@LINE+2]], i32 0, ![[SCOPE2:.*]], null}
|
// CHECK: {{.*}} = !MDLocation(line: [[@LINE+2]], scope: ![[SCOPE2:.*]])
|
||||||
// CHECK: ![[SCOPE2]] = !{!"0xb\00[[@LINE-3]]\00{{.*}}", {{.*}} ; [ DW_TAG_lexical_block ]
|
// CHECK: ![[SCOPE2]] = !{!"0xb\00[[@LINE-3]]\00{{.*}}", {{.*}} ; [ DW_TAG_lexical_block ]
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// CHECK: ![[RETBAZ]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RETBAZ]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
// CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]]
|
// CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]]
|
||||||
// CHECK-DAG: ![[CURRENT_ADDR]] = {{.*}} [current_address]
|
// CHECK-DAG: ![[CURRENT_ADDR]] = {{.*}} [current_address]
|
||||||
// CHECK-DAG: ![[FOUND_IT]] = {{.*}} [found_it]
|
// CHECK-DAG: ![[FOUND_IT]] = {{.*}} [found_it]
|
||||||
// CHECK-DAG: ![[DBG1]] = !{i32 256,
|
// CHECK-DAG: ![[DBG1]] = !MDLocation(line: 256,
|
||||||
// CHECK-DAG: ![[DBG2]] = !{i32 257,
|
// CHECK-DAG: ![[DBG2]] = !MDLocation(line: 257,
|
||||||
// CHECK-DAG: ![[DBG3]] = !{i32 268,
|
// CHECK-DAG: ![[DBG3]] = !MDLocation(line: 268,
|
||||||
// CHECK-DAG: ![[DBG4]] = !{i32 256,
|
// CHECK-DAG: ![[DBG4]] = !MDLocation(line: 256,
|
||||||
typedef unsigned long long uint64_t;
|
typedef unsigned long long uint64_t;
|
||||||
template<class _Tp> class shared_ptr {
|
template<class _Tp> class shared_ptr {
|
||||||
public:
|
public:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// CHECK: [[HPP:.*]] = !{!"./template.hpp",
|
// CHECK: [[HPP:.*]] = !{!"./template.hpp",
|
||||||
// CHECK: [[SP:.*]] = !{!"0x2e\00{{.*}}", [[HPP]],{{.*}}[ DW_TAG_subprogram ] [line 22] [def] [bar]
|
// CHECK: [[SP:.*]] = !{!"0x2e\00{{.*}}", [[HPP]],{{.*}}[ DW_TAG_subprogram ] [line 22] [def] [bar]
|
||||||
// We shouldn't need a lexical block for this function.
|
// We shouldn't need a lexical block for this function.
|
||||||
// CHECK: [[DBG]] = !{i32 23, i32 0, [[SP]], null}
|
// CHECK: [[DBG]] = !MDLocation(line: 23, scope: [[SP]])
|
||||||
|
|
||||||
|
|
||||||
# 1 "./template.h" 1
|
# 1 "./template.h" 1
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// CHECK: ret i32
|
// CHECK: ret i32
|
||||||
// CHECK: landingpad {{.*}}
|
// CHECK: landingpad {{.*}}
|
||||||
// CHECK-NEXT: !dbg ![[LPAD:[0-9]+]]
|
// CHECK-NEXT: !dbg ![[LPAD:[0-9]+]]
|
||||||
// CHECK: ![[LPAD]] = !{i32 24, i32 0, !{{.*}}, null}
|
// CHECK: ![[LPAD]] = !MDLocation(line: 24, scope: !{{.*}})
|
||||||
|
|
||||||
# 1 "/usr/include/c++/4.2.1/vector" 1 3
|
# 1 "/usr/include/c++/4.2.1/vector" 1 3
|
||||||
typedef long unsigned int __darwin_size_t;
|
typedef long unsigned int __darwin_size_t;
|
||||||
|
@ -32,8 +32,8 @@ NSRect NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h);
|
|||||||
// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC:[0-9]+]]
|
// CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC:[0-9]+]]
|
||||||
// CHECK: call {{.*}} @objc_autoreleaseReturnValue{{.*}} !dbg ![[ARC]]
|
// CHECK: call {{.*}} @objc_autoreleaseReturnValue{{.*}} !dbg ![[ARC]]
|
||||||
// CHECK: ret {{.*}} !dbg ![[ARC]]
|
// CHECK: ret {{.*}} !dbg ![[ARC]]
|
||||||
// CHECK: ![[RET]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return path;
|
return path;
|
||||||
// CHECK: ![[ARC]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[ARC]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
@ -57,52 +57,52 @@ typedef signed char BOOL;
|
|||||||
// CHECK: ![[TESTNOSIDEEFFECT:.*]] = {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+1]]] [local] [def] [-[AppDelegate testNoSideEffect:]]
|
// CHECK: ![[TESTNOSIDEEFFECT:.*]] = {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+1]]] [local] [def] [-[AppDelegate testNoSideEffect:]]
|
||||||
- (int)testNoSideEffect:(NSString *)foo {
|
- (int)testNoSideEffect:(NSString *)foo {
|
||||||
int x = 1;
|
int x = 1;
|
||||||
// CHECK: ![[ARC1]] = !{i32 [[@LINE+1]], i32 0, ![[TESTNOSIDEEFFECT]], null}
|
// CHECK: ![[ARC1]] = !MDLocation(line: [[@LINE+1]], scope: ![[TESTNOSIDEEFFECT]])
|
||||||
return 1; // Return expression
|
return 1; // Return expression
|
||||||
// CHECK: ![[RET1]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET1]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
} // Cleanup + Ret
|
} // Cleanup + Ret
|
||||||
|
|
||||||
- (int)testNoCleanup {
|
- (int)testNoCleanup {
|
||||||
// CHECK: ![[RET2]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET2]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)testSideEffect:(NSString *)foo {
|
- (int)testSideEffect:(NSString *)foo {
|
||||||
// CHECK: ![[MSG3]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[MSG3]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return [self testNoSideEffect :foo];
|
return [self testNoSideEffect :foo];
|
||||||
// CHECK: ![[RET3]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET3]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)testMultiline:(NSString *)foo {
|
- (int)testMultiline:(NSString *)foo {
|
||||||
// CHECK: ![[MSG4]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[MSG4]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
int r = [self testSideEffect :foo];
|
int r = [self testSideEffect :foo];
|
||||||
// CHECK: ![[EXP4]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[EXP4]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return r;
|
return r;
|
||||||
// CHECK: ![[RET4]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET4]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testVoid:(NSString *)foo {
|
- (void)testVoid:(NSString *)foo {
|
||||||
// CHECK: ![[ARC5]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[ARC5]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return;
|
return;
|
||||||
// CHECK: ![[RET5]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET5]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testVoidNoReturn:(NSString *)foo {
|
- (void)testVoidNoReturn:(NSString *)foo {
|
||||||
// CHECK: ![[MSG6]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[MSG6]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
[self testVoid :foo];
|
[self testVoid :foo];
|
||||||
// CHECK: ![[RET6]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET6]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)testNoCleanupSideEffect {
|
- (int)testNoCleanupSideEffect {
|
||||||
// CHECK: ![[MSG7]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[MSG7]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
[self testVoid :@"foo"];
|
[self testVoid :@"foo"];
|
||||||
// CHECK: ![[RET7]] = !{i32 [[@LINE+1]], i32 0, !{{.*}}, null}
|
// CHECK: ![[RET7]] = !MDLocation(line: [[@LINE+1]], scope: !{{.*}})
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testCleanupVoid:(BOOL)skip withDelegate: (AppDelegate *) delegate {
|
- (void)testCleanupVoid:(BOOL)skip withDelegate: (AppDelegate *) delegate {
|
||||||
static BOOL skip_all;
|
static BOOL skip_all;
|
||||||
// CHECK: ![[SKIP1]] = !{i32 [[@LINE+1]], i32 0,
|
// CHECK: ![[SKIP1]] = !MDLocation(line: [[@LINE+1]], scope:
|
||||||
if (!skip_all) {
|
if (!skip_all) {
|
||||||
if (!skip) {
|
if (!skip) {
|
||||||
return;
|
return;
|
||||||
@ -112,8 +112,8 @@ typedef signed char BOOL;
|
|||||||
[delegate testVoid :s];
|
[delegate testVoid :s];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CHECK: ![[RET8]] = !{i32 [[@LINE+2]], i32 0,
|
// CHECK: ![[RET8]] = !MDLocation(line: [[@LINE+2]], scope:
|
||||||
// CHECK: ![[ARC8]] = !{i32 [[@LINE+1]], i32 0,
|
// CHECK: ![[ARC8]] = !MDLocation(line: [[@LINE+1]], scope:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
// CHECK-NOT: ret
|
// CHECK-NOT: ret
|
||||||
// CHECK: load {{.*}}, !dbg ![[DESTROY_LINE:[0-9]+]]
|
// CHECK: load {{.*}}, !dbg ![[DESTROY_LINE:[0-9]+]]
|
||||||
|
|
||||||
// CHECK-DAG: [[DBG_LINE]] = !{i32 0, i32 0, ![[COPY_SP:[0-9]+]], null}
|
// CHECK-DAG: [[DBG_LINE]] = !MDLocation(line: 0, scope: ![[COPY_SP:[0-9]+]])
|
||||||
// CHECK-DAG: [[COPY_LINE]] = !{i32 0, i32 0, ![[COPY_SP:[0-9]+]], null}
|
// 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]] = {{.*}}[ DW_TAG_subprogram ]{{.*}}[__copy_helper_block_]
|
||||||
// CHECK-DAG: [[DESTROY_LINE]] = !{i32 0, i32 0, ![[DESTROY_SP:[0-9]+]], null}
|
// 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]] = {{.*}}[ DW_TAG_subprogram ]{{.*}}[__destroy_helper_block_]
|
||||||
typedef unsigned int NSUInteger;
|
typedef unsigned int NSUInteger;
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
//
|
//
|
||||||
// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+4]]] [local] [def] [-[I p1]]
|
// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+4]]] [local] [def] [-[I p1]]
|
||||||
// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+3]]] [local] [def] [-[I setP1:]]
|
// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+3]]] [local] [def] [-[I setP1:]]
|
||||||
// CHECK: ![[DBG1]] = !{i32 [[@LINE+2]],
|
// CHECK: ![[DBG1]] = !MDLocation(line: [[@LINE+2]],
|
||||||
// CHECK: ![[DBG2]] = !{i32 [[@LINE+1]],
|
// CHECK: ![[DBG2]] = !MDLocation(line: [[@LINE+1]],
|
||||||
@property int p1;
|
@property int p1;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -26,5 +26,5 @@ void f1() {
|
|||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// CHECK: [[DBG_F1]] = !{i32 100,
|
// CHECK: [[DBG_F1]] = !MDLocation(line: 100,
|
||||||
// CHECK: [[DBG_TNSO]] = !{i32 200,
|
// CHECK: [[DBG_TNSO]] = !MDLocation(line: 200,
|
||||||
|
Loading…
Reference in New Issue
Block a user