• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; The following two object files were generated using the following command:
2;   $ cl /d2Zi+ /Zc:inline /O2 /Z7 /c t.cpp
3; The contents of t.cpp follow:
4;   static void bar() {
5;     __asm nop
6;   }
7;   static void baz() {
8;     __asm nop
9;   }
10;   static __forceinline void foo() {
11;     __asm nop
12;   #include "a.h"
13;   #include "b.h"
14;     __asm nop
15;     goto forwards;
16;
17;   backwards:
18;     __asm nop
19;     return;
20;
21;   forwards:
22;     __asm rep nop
23;     goto backwards;
24;   }
25;   int main() {
26;     bar();
27;     baz();
28;     foo();
29;   }
30;
31; Both a.h and b.h contain "__asm nop".
32
33RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/codeview-inlining.obj.coff | FileCheck %s
34
35; FIXME: If we were more clever, we could turn FileIDs into paths.
36
37; CHECK:       SubSectionType: InlineeLines (0xF6)
38; CHECK-NEXT:  SubSectionSize: 0x3C
39; CHECK-NEXT:  InlineeSourceLine {
40; CHECK-NEXT:    Inlinee: bar (0x1002)
41; CHECK-NEXT:    FileID: d:\src\llvm\build\t.cpp (0x30)
42; CHECK-NEXT:    SourceLineNum: 2
43; CHECK-NEXT:    ExtraFileCount: 0
44; CHECK-NEXT:    ExtraFiles [
45; CHECK-NEXT:    ]
46; CHECK-NEXT:  }
47; CHECK-NEXT:  InlineeSourceLine {
48; CHECK-NEXT:    Inlinee: baz (0x1003)
49; CHECK-NEXT:    FileID: d:\src\llvm\build\t.cpp (0x30)
50; CHECK-NEXT:    SourceLineNum: 5
51; CHECK-NEXT:    ExtraFileCount: 0
52; CHECK-NEXT:    ExtraFiles [
53; CHECK-NEXT:    ]
54; CHECK-NEXT:  }
55;   The 'foo' inline site has extra files due to includes.
56; CHECK-NEXT:  InlineeSourceLine {
57; CHECK-NEXT:    Inlinee: foo (0x1004)
58; CHECK-NEXT:    FileID: d:\src\llvm\build\a.h (0x0)
59; CHECK-NEXT:    SourceLineNum: 1
60; CHECK-NEXT:    ExtraFileCount: 2
61; CHECK-NEXT:    ExtraFiles [
62; CHECK-NEXT:      FileID: d:\src\llvm\build\b.h (0x18)
63; CHECK-NEXT:      FileID: d:\src\llvm\build\t.cpp (0x30)
64; CHECK-NEXT:    ]
65; CHECK-NEXT:  }
66