Reland "[llvm-readobj] Simplify usage of -codeview flag"
[oota-llvm.git] / test / DebugInfo / debugmacinfo.test
1 RUN: llvm-dwarfdump -debug-dump=macro %p/Inputs/dwarfdump-macro.o \\r
2 RUN:   | FileCheck %s -check-prefix TEST_MACINFO\r
3 RUN: llvm-dwarfdump -debug-dump=line %p/Inputs/dwarfdump-macro.o \\r
4 RUN:   | FileCheck %s -check-prefix TEST_LINE\r
5 \r
6 \r
7 ; This test verifies that llvm-dwarfdump tools know how to read .debug_macinfo\r
8 ; section. It also checks that the file numbers fits with those in the\r
9 ; .debug_line section.\r
10 TEST_MACINFO: .debug_macinfo contents:\r
11 TEST_MACINFO: DW_MACINFO_define - lineno: 0 macro: M3 Value3\r
12 TEST_MACINFO: DW_MACINFO_start_file - lineno: 0 filenum: 1\r
13 TEST_MACINFO:   DW_MACINFO_start_file - lineno: 0 filenum: 2\r
14 TEST_MACINFO:     DW_MACINFO_define - lineno: 1 macro: M4 Value4\r
15 TEST_MACINFO:   DW_MACINFO_end_file\r
16 TEST_MACINFO:   DW_MACINFO_define - lineno: 1 macro: M1 Value1\r
17 TEST_MACINFO:   DW_MACINFO_start_file - lineno: 2 filenum: 3\r
18 TEST_MACINFO:     DW_MACINFO_undef - lineno: 4 macro: M1\r
19 TEST_MACINFO:     DW_MACINFO_define - lineno: 5 macro: M1 NewValue1\r
20 TEST_MACINFO:   DW_MACINFO_end_file\r
21 TEST_MACINFO:   DW_MACINFO_define - lineno: 3 macro: M2(x,y) ((x)+(y)* Value2)\r
22 TEST_MACINFO: DW_MACINFO_end_file\r
23 \r
24 TEST_LINE: .debug_line contents:\r
25 TEST_LINE: file_names[  1]    0 0x00000000 0x00000000 dwarfdump-macro.cc\r
26 TEST_LINE: file_names[  2]    1 0x00000000 0x00000000 dwarfdump-macro-cmd.h\r
27 TEST_LINE: file_names[  3]    0 0x00000000 0x00000000 dwarfdump-macro.h\r