Mercurial > hg > CbC > CbC_llvm
diff test/Linker/replaced-function-matches-first-subprogram.ll @ 100:7d135dc70f03 LLVM 3.9
LLVM 3.9
author | Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 22:53:40 +0900 |
parents | afa8332a0e37 |
children | 1172e4bd9c6f |
line wrap: on
line diff
--- a/test/Linker/replaced-function-matches-first-subprogram.ll Tue Oct 13 17:49:56 2015 +0900 +++ b/test/Linker/replaced-function-matches-first-subprogram.ll Tue Jan 26 22:53:40 2016 +0900 @@ -15,17 +15,18 @@ %struct.Class = type { i8 } -define i32 @_Z3foov() { +; CHECK: define i32 @_Z3foov(){{.*}} !dbg ![[SP1:[0-9]+]] +define i32 @_Z3foov() !dbg !4 { entry: %tmp = alloca %struct.Class, align 1 %call = call i32 @_ZN5ClassIiE3fooEv(%struct.Class* %tmp), !dbg !14 ret i32 %call, !dbg !14 } -; CHECK: define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this){{.*}}{ +; CHECK: define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this){{.*}} !dbg ![[SP2:[0-9]+]] { ; CHECK-NOT: } ; CHECK: !dbg ![[LOC:[0-9]+]] -define linkonce_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 { +define linkonce_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 !dbg !7 { entry: %this.addr = alloca %struct.Class*, align 8 store %struct.Class* %this, %struct.Class** %this.addr, align 8 @@ -47,22 +48,20 @@ ; Extract out each compile unit's single subprogram. The replaced subprogram's ; function should drop to null in the first compile unit. -; CHECK-DAG: ![[SPs1]] = !{![[SP1:[0-9]+]], ![[SP2r:[0-9]+]]} -; CHECK-DAG: ![[SPs2]] = !{![[SP2:[0-9]+]]} +; CHECK-DAG: ![[SPs1]] = !{![[SP1]], ![[SP2r:[0-9]+]]} +; CHECK-DAG: ![[SPs2]] = !{![[SP2]]} !3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, function: i32 ()* @_Z3foov, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") !6 = !DISubroutineType(types: !2) -; Extract out the file from the replaced subprogram. Confirm that each -; subprogram is pointing at the correct function. -; CHECK-DAG: ![[SP1]] = distinct !DISubprogram({{.*}} function: i32 ()* @_Z3foov -; CHECK-DAG: ![[SP2]] = distinct !DISubprogram({{.*}} file: ![[FILE:[0-9]+]],{{.*}} function: i32 (%struct.Class*)* @_ZN5ClassIiE3fooEv +; Extract out the file from the replaced subprogram. +; CHECK-DAG: ![[SP2]] = distinct !DISubprogram({{.*}} file: ![[FILE:[0-9]+]], ; We can't use CHECK-NOT/CHECK-SAME with a CHECK-DAG, so rely on field order to ; prove that there's no function: here. ; CHECK-DAG: ![[SP2r]] = {{.*}}!DISubprogram({{.*}} isOptimized: false, variables: -!7 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !8, scope: !9, type: !6, function: i32 (%struct.Class*)* @_ZN5ClassIiE3fooEv, variables: !2) +!7 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !8, scope: !9, type: !6, variables: !2) ; The new subprogram should be pointing at the new directory. ; CHECK-DAG: ![[FILE]] = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2")