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/subprogram-linkonce-weak.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/subprogram-linkonce-weak.ll')
-rw-r--r-- | llvm/test/Linker/subprogram-linkonce-weak.ll | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/llvm/test/Linker/subprogram-linkonce-weak.ll b/llvm/test/Linker/subprogram-linkonce-weak.ll index 94d436594a5..598cea7afeb 100644 --- a/llvm/test/Linker/subprogram-linkonce-weak.ll +++ b/llvm/test/Linker/subprogram-linkonce-weak.ll @@ -33,15 +33,15 @@ define i32 @bar(i32 %a, i32 %b) { entry: - %sum = add i32 %a, %b, !dbg !MDLocation(line: 2, scope: !4, - inlinedAt: !MDLocation(line: 12, scope: !3)) - ret i32 %sum, !dbg !MDLocation(line: 13, scope: !3) + %sum = add i32 %a, %b, !dbg !DILocation(line: 2, scope: !4, + inlinedAt: !DILocation(line: 12, scope: !3)) + ret i32 %sum, !dbg !DILocation(line: 13, scope: !3) } define linkonce i32 @foo(i32 %a, i32 %b) { entry: - %sum = add i32 %a, %b, !dbg !MDLocation(line: 2, scope: !4) - ret i32 %sum, !dbg !MDLocation(line: 3, scope: !4) + %sum = add i32 %a, %b, !dbg !DILocation(line: 2, scope: !4) + ret i32 %sum, !dbg !DILocation(line: 3, scope: !4) } !llvm.module.flags = !{!0} @@ -52,46 +52,46 @@ entry: ; WL-SAME: !{![[WCU:[0-9]+]], ![[LCU:[0-9]+]]} !llvm.dbg.cu = !{!1} -; LW: ![[LCU]] = !MDCompileUnit({{.*}} subprograms: ![[LSPs:[0-9]+]] +; LW: ![[LCU]] = !DICompileUnit({{.*}} subprograms: ![[LSPs:[0-9]+]] ; LW: ![[LSPs]] = !{![[BARSP:[0-9]+]], ![[FOOSP:[0-9]+]]} -; LW: ![[BARSP]] = !MDSubprogram(name: "bar", +; LW: ![[BARSP]] = !DISubprogram(name: "bar", ; LW-SAME: function: i32 (i32, i32)* @bar -; LW: ![[FOOSP]] = {{.*}}!MDSubprogram(name: "foo", +; LW: ![[FOOSP]] = {{.*}}!DISubprogram(name: "foo", ; LW-NOT: function: ; LW-SAME: ){{$}} -; LW: ![[WCU]] = !MDCompileUnit({{.*}} subprograms: ![[WSPs:[0-9]+]] +; LW: ![[WCU]] = !DICompileUnit({{.*}} subprograms: ![[WSPs:[0-9]+]] ; LW: ![[WSPs]] = !{![[WEAKFOOSP:[0-9]+]]} -; LW: ![[WEAKFOOSP]] = !MDSubprogram(name: "foo", +; LW: ![[WEAKFOOSP]] = !DISubprogram(name: "foo", ; LW-SAME: function: i32 (i32, i32)* @foo -; LW: ![[FOOINBAR]] = !MDLocation(line: 2, scope: ![[FOOSP]], inlinedAt: ![[BARIA:[0-9]+]]) -; LW: ![[BARIA]] = !MDLocation(line: 12, scope: ![[BARSP]]) -; LW: ![[BARRET]] = !MDLocation(line: 13, scope: ![[BARSP]]) -; LW: ![[FOOCALL]] = !MDLocation(line: 52, scope: ![[WEAKFOOSP]]) -; LW: ![[FOORET]] = !MDLocation(line: 53, scope: ![[WEAKFOOSP]]) +; LW: ![[FOOINBAR]] = !DILocation(line: 2, scope: ![[FOOSP]], inlinedAt: ![[BARIA:[0-9]+]]) +; LW: ![[BARIA]] = !DILocation(line: 12, scope: ![[BARSP]]) +; LW: ![[BARRET]] = !DILocation(line: 13, scope: ![[BARSP]]) +; LW: ![[FOOCALL]] = !DILocation(line: 52, scope: ![[WEAKFOOSP]]) +; LW: ![[FOORET]] = !DILocation(line: 53, scope: ![[WEAKFOOSP]]) ; Same as above, but reordered. -; WL: ![[WCU]] = !MDCompileUnit({{.*}} subprograms: ![[WSPs:[0-9]+]] +; WL: ![[WCU]] = !DICompileUnit({{.*}} subprograms: ![[WSPs:[0-9]+]] ; WL: ![[WSPs]] = !{![[WEAKFOOSP:[0-9]+]]} -; WL: ![[WEAKFOOSP]] = !MDSubprogram(name: "foo", +; WL: ![[WEAKFOOSP]] = !DISubprogram(name: "foo", ; WL-SAME: function: i32 (i32, i32)* @foo -; WL: ![[LCU]] = !MDCompileUnit({{.*}} subprograms: ![[LSPs:[0-9]+]] +; WL: ![[LCU]] = !DICompileUnit({{.*}} subprograms: ![[LSPs:[0-9]+]] ; WL: ![[LSPs]] = !{![[BARSP:[0-9]+]], ![[FOOSP:[0-9]+]]} -; WL: ![[BARSP]] = !MDSubprogram(name: "bar", +; WL: ![[BARSP]] = !DISubprogram(name: "bar", ; WL-SAME: function: i32 (i32, i32)* @bar -; WL: ![[FOOSP]] = {{.*}}!MDSubprogram(name: "foo", +; WL: ![[FOOSP]] = {{.*}}!DISubprogram(name: "foo", ; Note, for symmetry, this should be "NOT: function:" and "SAME: ){{$}}". ; WL-SAME: function: i32 (i32, i32)* @foo -; WL: ![[FOOCALL]] = !MDLocation(line: 52, scope: ![[WEAKFOOSP]]) -; WL: ![[FOORET]] = !MDLocation(line: 53, scope: ![[WEAKFOOSP]]) -; WL: ![[FOOINBAR]] = !MDLocation(line: 2, scope: ![[FOOSP]], inlinedAt: ![[BARIA:[0-9]+]]) -; WL: ![[BARIA]] = !MDLocation(line: 12, scope: ![[BARSP]]) -; WL: ![[BARRET]] = !MDLocation(line: 13, scope: ![[BARSP]]) - -!1 = !MDCompileUnit(language: DW_LANG_C99, file: !2, subprograms: !{!3, !4}, emissionKind: 1) -!2 = !MDFile(filename: "bar.c", directory: "/path/to/dir") -!3 = !MDSubprogram(file: !2, scope: !2, line: 11, name: "bar", function: i32 (i32, i32)* @bar, type: !5) -!4 = !MDSubprogram(file: !2, scope: !2, line: 1, name: "foo", function: i32 (i32, i32)* @foo, type: !5) -!5 = !MDSubroutineType(types: !{}) +; WL: ![[FOOCALL]] = !DILocation(line: 52, scope: ![[WEAKFOOSP]]) +; WL: ![[FOORET]] = !DILocation(line: 53, scope: ![[WEAKFOOSP]]) +; WL: ![[FOOINBAR]] = !DILocation(line: 2, scope: ![[FOOSP]], inlinedAt: ![[BARIA:[0-9]+]]) +; WL: ![[BARIA]] = !DILocation(line: 12, scope: ![[BARSP]]) +; WL: ![[BARRET]] = !DILocation(line: 13, scope: ![[BARSP]]) + +!1 = !DICompileUnit(language: DW_LANG_C99, file: !2, subprograms: !{!3, !4}, emissionKind: 1) +!2 = !DIFile(filename: "bar.c", directory: "/path/to/dir") +!3 = !DISubprogram(file: !2, scope: !2, line: 11, name: "bar", function: i32 (i32, i32)* @bar, type: !5) +!4 = !DISubprogram(file: !2, scope: !2, line: 1, name: "foo", function: i32 (i32, i32)* @foo, type: !5) +!5 = !DISubroutineType(types: !{}) ; Crasher for llc. ; REQUIRES: object-emission |