2016-02-12 03:44:26 +08:00
; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 < %s -filetype=obj | llvm-readobj -codeview | FileCheck %s --check-prefix=OBJ
; This LL file was generated by running 'clang -O1 -g -gcodeview' on the
; following code:
; int volatile x;
; static inline void f() {
; ++x;
; }
; static inline void g() {
; f();
; }
; static inline void h() {
; g();
; }
; int main() {
; h();
; }
; OBJ: Subsection [
; OBJ: SubSectionType: Symbols (0xF1)
; OBJ: ProcStart {
; OBJ: InlineSite {
2016-09-08 00:15:31 +08:00
; OBJ: Inlinee: h (0x1002)
2016-02-12 03:44:26 +08:00
; OBJ: }
; OBJ: InlineSite {
2016-03-19 02:54:32 +08:00
; OBJ: Inlinee: g (0x1003)
2016-02-12 03:44:26 +08:00
; OBJ: }
; OBJ: InlineSite {
2016-09-08 00:15:31 +08:00
; OBJ: Inlinee: f (0x1004)
2016-02-12 03:44:26 +08:00
; OBJ: }
; OBJ: InlineSiteEnd {
; OBJ: }
; OBJ: InlineSiteEnd {
; OBJ: }
; OBJ: InlineSiteEnd {
; OBJ: }
; OBJ: ProcEnd
; OBJ: ]
; ModuleID = 't.cpp'
2016-12-22 08:45:21 +08:00
source_filename = "test/DebugInfo/COFF/inlining-levels.ll"
2016-02-12 03:44:26 +08:00
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc18.0.0"
2016-12-22 08:45:21 +08:00
@"\01?x@@3HC" = global i32 0 , align 4 , !dbg !0
2016-02-12 03:44:26 +08:00
; Function Attrs: norecurse nounwind uwtable
2016-12-22 08:45:21 +08:00
define i32 @main ( ) #0 !dbg !12 {
2016-02-12 03:44:26 +08:00
entry:
2016-12-22 08:45:21 +08:00
%0 = load volatile i32 , i32 * @"\01?x@@3HC" , align 4 , !dbg !15 , !tbaa !24
%inc.i.i.i = add nsw i32 %0 , 1 , !dbg !15
store volatile i32 %inc.i.i.i , i32 * @"\01?x@@3HC" , align 4 , !dbg !15 , !tbaa !24
2016-02-12 03:44:26 +08:00
ret i32 0 , !dbg !28
}
attributes #0 = { norecurse nounwind uwtable "disable-tail-calls" = "false" "less-precise-fpmad" = "false" "no-frame-pointer-elim" = "false" "no-infs-fp-math" = "false" "no-nans-fp-math" = "false" "stack-protector-buffer-size" = "8" "target-cpu" = "x86-64" "target-features" = "+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math" = "false" "use-soft-float" = "false" }
2016-12-22 08:45:21 +08:00
!llvm.dbg.cu = ! { !2 }
!llvm.module.flags = ! { !8 , !9 , !10 }
!llvm.ident = ! { !11 }
2016-02-12 03:44:26 +08:00
2016-12-22 08:45:21 +08:00
!0 = !DIGlobalVariableExpression ( var: !1 )
!1 = !DIGlobalVariable ( name: "x" , linkageName: "\01?x@@3HC" , scope: !2 , file: !3 , line: 1 , type: !6 , isLocal: false , isDefinition: true )
!2 = distinct !DICompileUnit ( language: D W _ L A N G _ C _ p l u s _ p l u s , file: !3 , producer: "clang version 3.9.0 " , isOptimized: true , runtimeVersion: 0 , emissionKind: F u l l D e b u g , enums: !4 , globals: !5 )
!3 = !DIFile ( filename: "t.cpp" , directory: "D:\5Csrc\5Cllvm\5Cbuild" )
!4 = ! { }
!5 = ! { !0 }
!6 = !DIDerivedType ( tag: D W _ T A G _ v o l a t i l e _ type , baseType: !7 )
2016-02-12 03:44:26 +08:00
!7 = !DIBasicType ( name: "int" , size: 32 , align: 32 , encoding: D W _ A T E _ s i g n e d )
2016-12-22 08:45:21 +08:00
!8 = ! { i32 2 , !"CodeView" , i32 1 }
!9 = ! { i32 2 , !"Debug Info Version" , i32 3 }
!10 = ! { i32 1 , !"PIC Level" , i32 2 }
!11 = ! { !"clang version 3.9.0 " }
!12 = distinct !DISubprogram ( name: "main" , scope: !3 , file: !3 , line: 12 , type: !13 , isLocal: false , isDefinition: true , scopeLine: 12 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , unit: !2 , variables: !4 )
!13 = !DISubroutineType ( types: !14 )
!14 = ! { !7 }
!15 = !DILocation ( line: 4 , column: 3 , scope: !16 , inlinedAt: !19 )
!16 = distinct !DISubprogram ( name: "f" , linkageName: "\01?f@@YAXXZ" , scope: !3 , file: !3 , line: 2 , type: !17 , isLocal: true , isDefinition: true , scopeLine: 2 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , unit: !2 , variables: !4 )
!17 = !DISubroutineType ( types: !18 )
!18 = ! { null }
!19 = distinct !DILocation ( line: 7 , column: 3 , scope: !20 , inlinedAt: !21 )
!20 = distinct !DISubprogram ( name: "g" , linkageName: "\01?g@@YAXXZ" , scope: !3 , file: !3 , line: 6 , type: !17 , isLocal: true , isDefinition: true , scopeLine: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , unit: !2 , variables: !4 )
!21 = distinct !DILocation ( line: 10 , column: 3 , scope: !22 , inlinedAt: !23 )
!22 = distinct !DISubprogram ( name: "h" , linkageName: "\01?h@@YAXXZ" , scope: !3 , file: !3 , line: 9 , type: !17 , isLocal: true , isDefinition: true , scopeLine: 9 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , unit: !2 , variables: !4 )
!23 = distinct !DILocation ( line: 13 , column: 3 , scope: !12 )
2016-02-12 03:44:26 +08:00
!24 = ! { !25 , !25 , i64 0 }
!25 = ! { !"int" , !26 , i64 0 }
!26 = ! { !"omnipotent char" , !27 , i64 0 }
!27 = ! { !"Simple C/C++ TBAA" }
2016-12-22 08:45:21 +08:00
!28 = !DILocation ( line: 14 , column: 1 , scope: !12 )