• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2RUN: rm -rf %t1/
3RUN: mkdir %t1
4RUN: obj2yaml %S/Inputs/precomp-a.obj > %t1/precomp-a.yaml
5RUN: obj2yaml %S/Inputs/precomp.obj > %t1/precomp.yaml
6RUN: yaml2obj %t1/precomp-a.yaml -o %t1/a.obj
7RUN: yaml2obj %t1/precomp.yaml -o %t1/precomp.obj
8RUN: llvm-readobj --codeview %t1/a.obj | FileCheck %s -check-prefix PRECOMP
9RUN: llvm-readobj --codeview %t1/precomp.obj | FileCheck %s -check-prefix ENDPRECOMP
10RUN: llvm-pdbutil dump -types %t1/a.obj | FileCheck %s -check-prefix PDB-PRECOMP
11RUN: llvm-pdbutil dump -types %t1/precomp.obj | FileCheck %s -check-prefix PDB-ENDPRECOMP
12
13ENDPRECOMP:      CodeViewTypes [
14ENDPRECOMP-NEXT:   Section: .debug$P (3)
15ENDPRECOMP:        EndPrecomp (0x1407) {
16ENDPRECOMP-NEXT:     TypeLeafKind: LF_ENDPRECOMP (0x14)
17ENDPRECOMP-NEXT:     Signature: 0x1116980E
18ENDPRECOMP-NEXT:   }
19
20PRECOMP:      CodeViewTypes [
21PRECOMP-NEXT:   Section: .debug$T (3)
22PRECOMP-NEXT:   Magic: 0x4
23PRECOMP-NEXT:   Precomp (0x1000) {
24PRECOMP-NEXT:     TypeLeafKind: LF_PRECOMP (0x1509)
25PRECOMP-NEXT:     StartIndex: 0x1000
26PRECOMP-NEXT:     Count: 0x407
27PRECOMP-NEXT:     Signature: 0x1116980E
28
29PDB-PRECOMP:                              Types (.debug$T)
30PDB-PRECOMP-NEXT: ============================================================
31PDB-PRECOMP-NEXT: Showing 0 records
32PDB-PRECOMP-NEXT: 0x1000 | LF_PRECOMP [size = 60] start index = 0x1000, types count = 0x407, signature = 0x1116980E, precomp path = f:\svn\lld\test\coff\precomp\precomp.obj
33
34PDB-ENDPRECOMP:                     Precompiled Types (.debug$P)
35PDB-ENDPRECOMP-NEXT: ============================================================
36PDB-ENDPRECOMP-NEXT: Showing 0 records
37PDB-ENDPRECOMP:      0x1407 | LF_ENDPRECOMP [size = 8] signature = 0x1116980E
38
39# // precomp.h
40# #pragma once
41# int Function(char A);
42#
43# // precomp.cpp
44# // cl.exe precomp.cpp /Z7 /Ycprecomp.h /c
45# #include "precomp.h"
46#
47# // a.cpp
48# #include "precomp.h"
49# int main(void) {
50#   Function('a');
51#   return 0;
52# }
53#
54# // cl.exe a.cpp /Z7 /Yuprecomp.h /c
55#
56# // obj2yaml precomp.obj >precomp-precomp.yaml
57# // obj2yaml a.obj >precomp-a.yaml
58