; REQUIRES: x86-registered-target ; Test case 2 - Assembler instructions. ; hello-world.cpp ; 1 extern int printf(const char * format, ... ); ; 2 ; 3 int main() ; 4 { ; 5 printf("Hello, World\n"); ; 6 return 0; ; 7 } ; Logical lines. ; The logical views shows the intermixed lines and assembler instructions, ; allowing to compare the code generated by the different toolchains. ; RUN: llvm-debuginfo-analyzer --attribute=level,format,producer \ ; RUN: --print=lines,instructions \ ; RUN: %p/Inputs/hello-world-codeview-clang.o \ ; RUN: %p/Inputs/hello-world-codeview-msvc.o 2>&1 | \ ; RUN: FileCheck --strict-whitespace -check-prefix=ONE %s ; ONE: Logical View: ; ONE-NEXT: [000] {File} 'hello-world-codeview-clang.o' -> COFF-x86-64 ; ONE-EMPTY: ; ONE-NEXT: [001] {CompileUnit} 'hello-world.cpp' ; ONE-NEXT: [002] {Producer} 'clang version 15.0.0 {{.*}}' ; ONE-NEXT: [002] {Function} extern not_inlined 'main' -> 'int' ; ONE-NEXT: [003] 4 {Line} ; ONE-NEXT: [003] {Code} 'subq $0x28, %rsp' ; ONE-NEXT: [003] {Code} 'movl $0x0, 0x24(%rsp)' ; ONE-NEXT: [003] 5 {Line} ; ONE-NEXT: [003] {Code} 'leaq (%rip), %rcx' ; ONE-NEXT: [003] {Code} 'callq 0x0' ; ONE-NEXT: [003] 6 {Line} ; ONE-NEXT: [003] {Code} 'xorl %eax, %eax' ; ONE-NEXT: [003] {Code} 'addq $0x28, %rsp' ; ONE-NEXT: [003] {Code} 'retq' ; ONE-EMPTY: ; ONE-NEXT: Logical View: ; ONE-NEXT: [000] {File} 'hello-world-codeview-msvc.o' -> COFF-x86-64 ; ONE-EMPTY: ; ONE-NEXT: [001] {CompileUnit} 'hello-world.cpp' ; ONE-NEXT: [002] {Producer} 'Microsoft (R) Optimizing Compiler' ; ONE-NEXT: [002] {Function} extern not_inlined 'main' -> 'int' ; ONE-NEXT: [003] 4 {Line} ; ONE-NEXT: [003] {Code} 'subq $0x28, %rsp' ; ONE-NEXT: [003] 5 {Line} ; ONE-NEXT: [003] {Code} 'leaq (%rip), %rcx' ; ONE-NEXT: [003] {Code} 'callq 0x0' ; ONE-NEXT: [003] 6 {Line} ; ONE-NEXT: [003] {Code} 'xorl %eax, %eax' ; ONE-NEXT: [003] 7 {Line} ; ONE-NEXT: [003] {Code} 'addq $0x28, %rsp' ; ONE-NEXT: [003] {Code} 'retq'