reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
; The following two object files were generated using the following command:
;   $ cl /d2Zi+ /Zc:inline /O2 /Z7 /c t.cpp
; The contents of t.cpp follow:
;   static void bar() {
;     __asm nop
;   }
;   static void baz() {
;     __asm nop
;   }
;   static __forceinline void foo() {
;     __asm nop
;   #include "a.h"
;   #include "b.h"
;     __asm nop
;     goto forwards;
;
;   backwards:
;     __asm nop
;     return;
;
;   forwards:
;     __asm rep nop
;     goto backwards;
;   }
;   int main() {
;     bar();
;     baz();
;     foo();
;   }
;
; Both a.h and b.h contain "__asm nop".

RUN: llvm-readobj -S --codeview --section-symbols %p/Inputs/codeview-inlining.obj.coff | FileCheck %s

; FIXME: If we were more clever, we could turn FileIDs into paths.

; CHECK:       SubSectionType: InlineeLines (0xF6)
; CHECK-NEXT:  SubSectionSize: 0x3C
; CHECK-NEXT:  InlineeSourceLine {
; CHECK-NEXT:    Inlinee: bar (0x1002)
; CHECK-NEXT:    FileID: d:\src\llvm\build\t.cpp (0x30)
; CHECK-NEXT:    SourceLineNum: 2
; CHECK-NEXT:    ExtraFileCount: 0
; CHECK-NEXT:    ExtraFiles [
; CHECK-NEXT:    ]
; CHECK-NEXT:  }
; CHECK-NEXT:  InlineeSourceLine {
; CHECK-NEXT:    Inlinee: baz (0x1003)
; CHECK-NEXT:    FileID: d:\src\llvm\build\t.cpp (0x30)
; CHECK-NEXT:    SourceLineNum: 5
; CHECK-NEXT:    ExtraFileCount: 0
; CHECK-NEXT:    ExtraFiles [
; CHECK-NEXT:    ]
; CHECK-NEXT:  }
;   The 'foo' inline site has extra files due to includes.
; CHECK-NEXT:  InlineeSourceLine {
; CHECK-NEXT:    Inlinee: foo (0x1004)
; CHECK-NEXT:    FileID: d:\src\llvm\build\a.h (0x0)
; CHECK-NEXT:    SourceLineNum: 1
; CHECK-NEXT:    ExtraFileCount: 2
; CHECK-NEXT:    ExtraFiles [
; CHECK-NEXT:      FileID: d:\src\llvm\build\b.h (0x18)
; CHECK-NEXT:      FileID: d:\src\llvm\build\t.cpp (0x30)
; CHECK-NEXT:    ]
; CHECK-NEXT:  }