Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-debuginfo-analyzer / COFF / 01-coff-compare-logical-elements.test
blob9de2c2fd5062f1935e63630df79d4727b66c516a
1 ; REQUIRES: x86-registered-target
3 ; Test case 1 - General options
5 ; test.cpp
6 ;  1  using INTPTR = const int *;
7 ;  2  int foo(INTPTR ParamPtr, unsigned ParamUnsigned, bool ParamBool) {
8 ;  3    if (ParamBool) {
9 ;  4      typedef int INTEGER;
10 ;  5      const INTEGER CONSTANT = 7;
11 ;  6      return CONSTANT;
12 ;  7    }
13 ;  8    return ParamUnsigned;
14 ;  9  }
16 ; Compare mode - Logical view.
17 ; The output shows in view form the 'missing (-), added (+)' elements,
18 ; giving more context by swapping the reference and target object files.
20 ; RUN: llvm-debuginfo-analyzer --attribute=level \
21 ; RUN:                         --compare=types \
22 ; RUN:                         --report=view \
23 ; RUN:                         --print=symbols,types \
24 ; RUN:                         %p/Inputs/test-codeview-clang.o \
25 ; RUN:                         %p/Inputs/test-codeview-msvc.o 2>&1 | \
26 ; RUN: FileCheck --strict-whitespace -check-prefix=ONE %s
28 ; ONE:      Reference: 'test-codeview-clang.o'
29 ; ONE-NEXT: Target:    'test-codeview-msvc.o'
30 ; ONE-EMPTY:
31 ; ONE-NEXT: Logical View:
32 ; ONE-NEXT:  [000]           {File} 'test-codeview-clang.o'
33 ; ONE-EMPTY:
34 ; ONE-NEXT:  [001]             {CompileUnit} 'test.cpp'
35 ; ONE-NEXT:  [002]               {TypeAlias} 'INTPTR' -> '* const int'
36 ; ONE-NEXT:  [002]               {Function} extern not_inlined 'foo' -> 'int'
37 ; ONE-NEXT: -[003]                 {TypeAlias} 'INTEGER' -> 'int'
38 ; ONE-NEXT:  [003]                 {Parameter} 'ParamBool' -> 'bool'
39 ; ONE-NEXT:  [003]                 {Parameter} 'ParamPtr' -> '* const int'
40 ; ONE-NEXT:  [003]                 {Parameter} 'ParamUnsigned' -> 'unsigned'
41 ; ONE-NEXT:  [003]                 {Block}
42 ; ONE-NEXT:  [004]                   {Variable} 'CONSTANT' -> 'const int'
43 ; ONE-NEXT: +[004]                   {TypeAlias} 'INTEGER' -> 'int'
45 ; Compare mode - Logical elements.
46 ; The output shows in tabular form the 'missing (-), added (+)' elements,
47 ; giving more context by swapping the reference and target object files.
49 ; RUN: llvm-debuginfo-analyzer --attribute=level \
50 ; RUN:                         --compare=types \
51 ; RUN:                         --report=list \
52 ; RUN:                         --print=symbols,types,summary \
53 ; RUN:                         %p/Inputs/test-codeview-clang.o \
54 ; RUN:                         %p/Inputs/test-codeview-msvc.o 2>&1 | \
55 ; RUN: FileCheck --strict-whitespace -check-prefix=TWO %s
57 ; TWO:      Reference: 'test-codeview-clang.o'
58 ; TWO-NEXT: Target:    'test-codeview-msvc.o'
59 ; TWO-EMPTY:
60 ; TWO-NEXT: (1) Missing Types:
61 ; TWO-NEXT: -[003]           {TypeAlias} 'INTEGER' -> 'int'
62 ; TWO-EMPTY:
63 ; TWO-NEXT: (1) Added Types:
64 ; TWO-NEXT: +[004]           {TypeAlias} 'INTEGER' -> 'int'
65 ; TWO-EMPTY:
66 ; TWO-NEXT: ----------------------------------------
67 ; TWO-NEXT: Element   Expected    Missing      Added
68 ; TWO-NEXT: ----------------------------------------
69 ; TWO-NEXT: Scopes           4          0          0
70 ; TWO-NEXT: Symbols          0          0          0
71 ; TWO-NEXT: Types            2          1          1
72 ; TWO-NEXT: Lines            0          0          0
73 ; TWO-NEXT: ----------------------------------------
74 ; TWO-NEXT: Total            6          1          1
76 ; Changing the 'Reference' and 'Target' order:
78 ; RUN: llvm-debuginfo-analyzer --attribute=level \
79 ; RUN:                         --compare=types \
80 ; RUN:                         --report=list \
81 ; RUN:                         --print=symbols,types,summary \
82 ; RUN:                         %p/Inputs/test-codeview-msvc.o \
83 ; RUN:                         %p/Inputs/test-codeview-clang.o 2>&1 | \
84 ; RUN: FileCheck --strict-whitespace -check-prefix=THR %s
86 ; THR:      Reference: 'test-codeview-msvc.o'
87 ; THR-NEXT: Target:    'test-codeview-clang.o'
88 ; THR-EMPTY:
89 ; THR-NEXT: (1) Missing Types:
90 ; THR-NEXT: -[004]           {TypeAlias} 'INTEGER' -> 'int'
91 ; THR-EMPTY:
92 ; THR-NEXT: (1) Added Types:
93 ; THR-NEXT: +[003]           {TypeAlias} 'INTEGER' -> 'int'
94 ; THR-EMPTY:
95 ; THR-NEXT: ----------------------------------------
96 ; THR-NEXT: Element   Expected    Missing      Added
97 ; THR-NEXT: ----------------------------------------
98 ; THR-NEXT: Scopes           4          0          0
99 ; THR-NEXT: Symbols          0          0          0
100 ; THR-NEXT: Types            2          1          1
101 ; THR-NEXT: Lines            0          0          0
102 ; THR-NEXT: ----------------------------------------
103 ; THR-NEXT: Total            6          1          1