xref: /llvm-project/llvm/test/DebugInfo/Generic/inlined-strings.ll (revision 4ab3041acbdc274050d6c53f72619c7455cbc97a)
10d6aeadcSAlexey Bataev; RUN: %llc_dwarf -O0 -filetype=obj < %s -dwarf-inlined-strings=Enable -o - | llvm-dwarfdump -show-form - | FileCheck %s
20d6aeadcSAlexey Bataev
30d6aeadcSAlexey Bataev; Also test that the null streamer doesn't crash with debug info.
40d6aeadcSAlexey Bataev; RUN: %llc_dwarf -O0 -filetype=null < %s -dwarf-inlined-strings=Enable
50d6aeadcSAlexey Bataev
60d6aeadcSAlexey Bataev; generated from the following source compiled to bitcode with clang -g -O1
70d6aeadcSAlexey Bataev; static int i;
80d6aeadcSAlexey Bataev; int main() {
90d6aeadcSAlexey Bataev;   (void)&i;
100d6aeadcSAlexey Bataev; }
110d6aeadcSAlexey Bataev
120d6aeadcSAlexey Bataev; CHECK-NOT: DW_FORM_str{{(p|x)}}
130d6aeadcSAlexey Bataev; CHECK: DW_FORM_string
140d6aeadcSAlexey Bataev; CHECK-NOT: DW_FORM_str{{(p|x)}}
150d6aeadcSAlexey Bataev
160d6aeadcSAlexey Bataev
170d6aeadcSAlexey Bataevsource_filename = "test/DebugInfo/Generic/global.ll"
180d6aeadcSAlexey Bataev
190d6aeadcSAlexey Bataev; Function Attrs: nounwind readnone uwtable
200d6aeadcSAlexey Bataevdefine i32 @main() #0 !dbg !9 {
210d6aeadcSAlexey Bataeventry:
220d6aeadcSAlexey Bataev  ret i32 0, !dbg !12
230d6aeadcSAlexey Bataev}
240d6aeadcSAlexey Bataev
25*4ab3041aSserge-sans-pailleattributes #0 = { nounwind readnone uwtable "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
260d6aeadcSAlexey Bataev
270d6aeadcSAlexey Bataev!llvm.dbg.cu = !{!0}
280d6aeadcSAlexey Bataev!llvm.module.flags = !{!7, !8}
290d6aeadcSAlexey Bataev
300d6aeadcSAlexey Bataev!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.4 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
310d6aeadcSAlexey Bataev!1 = !DIFile(filename: "global.cpp", directory: "/tmp")
320d6aeadcSAlexey Bataev!2 = !{}
330d6aeadcSAlexey Bataev!3 = !{!4}
340d6aeadcSAlexey Bataev!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression())
350d6aeadcSAlexey Bataev!5 = !DIGlobalVariable(name: "i", linkageName: "_ZL1i", scope: null, file: !1, line: 1, type: !6, isLocal: true, isDefinition: true)
360d6aeadcSAlexey Bataev!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
370d6aeadcSAlexey Bataev!7 = !{i32 2, !"Dwarf Version", i32 3}
380d6aeadcSAlexey Bataev!8 = !{i32 1, !"Debug Info Version", i32 3}
392c864551SShiva Chen!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !10, isLocal: false, isDefinition: true, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)
400d6aeadcSAlexey Bataev!10 = !DISubroutineType(types: !11)
410d6aeadcSAlexey Bataev!11 = !{!6}
420d6aeadcSAlexey Bataev!12 = !DILocation(line: 4, scope: !9)
430d6aeadcSAlexey Bataev
44