diff options
author | Petar Jovanovic <petar.jovanovic@mips.com> | 2019-03-19 13:49:03 +0000 |
---|---|---|
committer | Petar Jovanovic <petar.jovanovic@mips.com> | 2019-03-19 13:49:03 +0000 |
commit | 38a61873963f94ce0da04c37ad58358b60242e55 (patch) | |
tree | 5ae1065f1c634c2c4d2ffd6a2301c0bf2603d30f /llvm/test/Bitcode | |
parent | 423b9583065ca49ea6122741e4374902177e6a49 (diff) | |
download | bcm5719-llvm-38a61873963f94ce0da04c37ad58358b60242e55.tar.gz bcm5719-llvm-38a61873963f94ce0da04c37ad58358b60242e55.zip |
[DebugInfoMetadata] Move main subprogram DIFlag into DISPFlags
Moving subprogram specific flags into DISPFlags makes IR code more readable.
In addition, we provide free space in DIFlags for other
'non-subprogram-specific' debug info flags.
Patch by Djordje Todorovic.
Differential Revision: https://reviews.llvm.org/D59288
llvm-svn: 356454
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r-- | llvm/test/Bitcode/DISubprogram-v5.ll | 24 | ||||
-rwxr-xr-x | llvm/test/Bitcode/DISubprogram-v5.ll.bc | bin | 0 -> 1300 bytes |
2 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/DISubprogram-v5.ll b/llvm/test/Bitcode/DISubprogram-v5.ll new file mode 100644 index 00000000000..58e8600115f --- /dev/null +++ b/llvm/test/Bitcode/DISubprogram-v5.ll @@ -0,0 +1,24 @@ + ; The .bc file was generated from this source using llvm-as from 8.0 release. + ; RUN: llvm-dis < %s.bc | FileCheck %s + +define i32 @main() !dbg !5 { +entry: + %retval = alloca i32, align 4 + store i32 0, i32* %retval + ret i32 0, !dbg !9 +} + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} + +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2) +!1 = !DIFile(filename: "mainsubprogram.c", directory: "/dir") +!2 = !{} +!3 = !{i32 2, !"Dwarf Version", i32 4} +!4 = !{i32 1, !"Debug Info Version", i32 3} +!5 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !6, scopeLine: 6, virtualIndex: 6, flags: DIFlagPrototyped | DIFlagMainSubprogram, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) +; CHECK: !5 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !6, scopeLine: 6, virtualIndex: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !0, retainedNodes: !2) +!6 = !DISubroutineType(types: !7) +!7 = !{!8} +!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !DILocation(line: 7, scope: !5) diff --git a/llvm/test/Bitcode/DISubprogram-v5.ll.bc b/llvm/test/Bitcode/DISubprogram-v5.ll.bc Binary files differnew file mode 100755 index 00000000000..f3482e1c1a7 --- /dev/null +++ b/llvm/test/Bitcode/DISubprogram-v5.ll.bc |