brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 14c4f1a Raw
66 lines · plain
1; The following two object files were generated using the following command:2;   $ cl /d2Zi+ /Zc:inline /O2 /Z7 /c t.cpp3; The contents of t.cpp follow:4;   static void bar() {5;     __asm nop6;   }7;   static void baz() {8;     __asm nop9;   }10;   static __forceinline void foo() {11;     __asm nop12;   #include "a.h"13;   #include "b.h"14;     __asm nop15;     goto forwards;16;17;   backwards:18;     __asm nop19;     return;20;21;   forwards:22;     __asm rep nop23;     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 %s34 35; FIXME: If we were more clever, we could turn FileIDs into paths.36 37; CHECK:       SubSectionType: InlineeLines (0xF6)38; CHECK-NEXT:  SubSectionSize: 0x3C39; CHECK-NEXT:  InlineeSourceLine {40; CHECK-NEXT:    Inlinee: bar (0x1002)41; CHECK-NEXT:    FileID: d:\src\llvm\build\t.cpp (0x30)42; CHECK-NEXT:    SourceLineNum: 243; CHECK-NEXT:    ExtraFileCount: 044; 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: 551; CHECK-NEXT:    ExtraFileCount: 052; 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: 160; CHECK-NEXT:    ExtraFileCount: 261; 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