diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-29 16:38:44 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-29 16:38:44 +0000 |
| commit | a9308c49ef421d5fa6c990bc8cbdf500acbffd33 (patch) | |
| tree | 47dd65fa788567095dea285879afda802522a48d /llvm/test/Linker/replaced-function-matches-first-subprogram.ll | |
| parent | 753954873832863c045afe09953c67bf21ed7fc5 (diff) | |
| download | bcm5719-llvm-a9308c49ef421d5fa6c990bc8cbdf500acbffd33.tar.gz bcm5719-llvm-a9308c49ef421d5fa6c990bc8cbdf500acbffd33.zip | |
IR: Give 'DI' prefix to debug info metadata
Finish off PR23080 by renaming the debug info IR constructs from `MD*`
to `DI*`. The last of the `DIDescriptor` classes were deleted in
r235356, and the last of the related typedefs removed in r235413, so
this has all baked for about a week.
Note: If you have out-of-tree code (like a frontend), I recommend that
you get everything compiling and tests passing with the *previous*
commit before updating to this one. It'll be easier to keep track of
what code is using the `DIDescriptor` hierarchy and what you've already
updated, and I think you're extremely unlikely to insert bugs. YMMV of
course.
Back to *this* commit: I did this using the rename-md-di-nodes.sh
upgrade script I've attached to PR23080 (both code and testcases) and
filtered through clang-format-diff.py. I edited the tests for
test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns
were off-by-three. It should work on your out-of-tree testcases (and
code, if you've followed the advice in the previous paragraph).
Some of the tests are in badly named files now (e.g.,
test/Assembler/invalid-mdcompositetype-missing-tag.ll should be
'dicompositetype'); I'll come back and move the files in a follow-up
commit.
llvm-svn: 236120
Diffstat (limited to 'llvm/test/Linker/replaced-function-matches-first-subprogram.ll')
| -rw-r--r-- | llvm/test/Linker/replaced-function-matches-first-subprogram.ll | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/llvm/test/Linker/replaced-function-matches-first-subprogram.ll b/llvm/test/Linker/replaced-function-matches-first-subprogram.ll index ac6633d1c01..fc7e653786e 100644 --- a/llvm/test/Linker/replaced-function-matches-first-subprogram.ll +++ b/llvm/test/Linker/replaced-function-matches-first-subprogram.ll @@ -39,10 +39,10 @@ entry: !llvm.ident = !{!13} ; Extract out the list of subprograms from each compile unit. -; CHECK-DAG: ![[CU1]] = !MDCompileUnit({{.*}} subprograms: ![[SPs1:[0-9]+]] -; CHECK-DAG: ![[CU2]] = !MDCompileUnit({{.*}} subprograms: ![[SPs2:[0-9]+]] -!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) -!1 = !MDFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") +; CHECK-DAG: ![[CU1]] = !DICompileUnit({{.*}} subprograms: ![[SPs1:[0-9]+]] +; CHECK-DAG: ![[CU2]] = !DICompileUnit({{.*}} subprograms: ![[SPs2:[0-9]+]] +!0 = !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !DIFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") !2 = !{} ; Extract out each compile unit's single subprogram. The replaced subprogram's @@ -50,30 +50,30 @@ entry: ; CHECK-DAG: ![[SPs1]] = !{![[SP1:[0-9]+]], ![[SP2r:[0-9]+]]} ; CHECK-DAG: ![[SPs2]] = !{![[SP2:[0-9]+]]} !3 = !{!4, !7} -!4 = !MDSubprogram(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) -!5 = !MDFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") -!6 = !MDSubroutineType(types: !2) +!4 = !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) +!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]] = !MDSubprogram({{.*}} function: i32 ()* @_Z3foov -; CHECK-DAG: ![[SP2]] = !MDSubprogram({{.*}} file: ![[FILE:[0-9]+]],{{.*}} function: i32 (%struct.Class*)* @_ZN5ClassIiE3fooEv +; CHECK-DAG: ![[SP1]] = !DISubprogram({{.*}} function: i32 ()* @_Z3foov +; CHECK-DAG: ![[SP2]] = !DISubprogram({{.*}} file: ![[FILE:[0-9]+]],{{.*}} function: i32 (%struct.Class*)* @_ZN5ClassIiE3fooEv ; 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]] = {{.*}}!MDSubprogram({{.*}} isOptimized: false, variables: -!7 = !MDSubprogram(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) +; CHECK-DAG: ![[SP2r]] = {{.*}}!DISubprogram({{.*}} isOptimized: false, variables: +!7 = !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) ; The new subprogram should be pointing at the new directory. -; CHECK-DAG: ![[FILE]] = !MDFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2") -!8 = !MDFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") -!9 = !MDFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") +; CHECK-DAG: ![[FILE]] = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2") +!8 = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") +!9 = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1") !10 = !{i32 2, !"Dwarf Version", i32 2} !11 = !{i32 2, !"Debug Info Version", i32 3} !12 = !{i32 1, !"PIC Level", i32 2} !13 = !{!"clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)"} -!14 = !MDLocation(line: 2, column: 20, scope: !4) +!14 = !DILocation(line: 2, column: 20, scope: !4) ; The same subprogram should be pointed to by inside the !dbg reference. -; CHECK: ![[LOC]] = !MDLocation(line: 2, column: 15, scope: ![[SP2]]) -!15 = !MDLocation(line: 2, column: 15, scope: !7) +; CHECK: ![[LOC]] = !DILocation(line: 2, column: 15, scope: ![[SP2]]) +!15 = !DILocation(line: 2, column: 15, scope: !7) |

