aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test7
-rw-r--r--llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test778
-rw-r--r--llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test19
-rw-r--r--llvm/test/tools/llvm-dwarfdump/dump_dwo.test7
-rw-r--r--llvm/test/tools/llvm-ir2vec/entities.ll95
-rw-r--r--llvm/test/tools/llvm-ir2vec/error-handling.ll22
-rw-r--r--llvm/test/tools/llvm-ir2vec/triplets.ll51
-rw-r--r--llvm/test/tools/llvm-libtool-darwin/L-and-l.test91
-rw-r--r--llvm/test/tools/llvm-mc/disassembler-profile.test12
-rw-r--r--llvm/test/tools/llvm-objcopy/COFF/dump-section.test2
-rw-r--r--llvm/test/tools/llvm-objcopy/COFF/exe-bogus-assoc.test134
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofexebin1611256 -> 1666656 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofrawbin75792 -> 20256 bytes
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/basic.memprofexebin1604896 -> 1660336 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/basic.memprofrawbin1152 -> 1152 bytes
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofexebin0 -> 1604896 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofrawbin0 -> 1152 bytes
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/buildid.memprofexebin1604904 -> 1660336 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/buildid.memprofrawbin1152 -> 1152 bytes
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/inline.memprofexebin1605480 -> 1660912 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/inline.memprofrawbin976 -> 976 bytes
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/multi.memprofexebin1604912 -> 1660352 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/multi.memprofrawbin1920 -> 1920 bytes
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofexebin1606576 -> 1661960 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofrawbin74952 -> 19608 bytes
-rwxr-xr-xllvm/test/tools/llvm-profdata/Inputs/pic.memprofexebin1607856 -> 1663288 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/Inputs/pic.memprofrawbin1152 -> 1152 bytes
-rw-r--r--llvm/test/tools/llvm-profdata/memprof-basic-histogram.test4
-rw-r--r--llvm/test/tools/llvm-profdata/memprof-basic.test4
-rw-r--r--llvm/test/tools/llvm-profdata/memprof-basic_v4.test102
-rw-r--r--llvm/test/tools/llvm-profdata/memprof-inline.test2
-rw-r--r--llvm/test/tools/llvm-profdata/memprof-multi.test2
-rw-r--r--llvm/test/tools/llvm-profdata/memprof-padding-histogram.test154
-rw-r--r--llvm/test/tools/llvm-profdata/memprof-pic.test4
-rw-r--r--llvm/test/tools/llvm-rc/windres-preproc.test4
-rw-r--r--llvm/test/tools/llvm-readobj/COFF/Inputs/has-cet.exebin94720 -> 0 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/COFF/Inputs/has-exdllcharacteristics.exebin0 -> 5120 bytes
-rw-r--r--llvm/test/tools/llvm-readobj/COFF/cetcompat.test16
-rw-r--r--llvm/test/tools/llvm-readobj/COFF/exdllcharacteristics.test22
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/sframe-fde.test237
-rw-r--r--llvm/test/tools/llvm-readobj/ELF/sframe-header.test67
-rw-r--r--llvm/test/tools/llvm-reduce/operands-to-args-lifetimes.ll18
-rw-r--r--llvm/test/tools/obj2yaml/ELF/eflags.yaml31
-rw-r--r--llvm/test/tools/yaml2obj/file-header-flags.yaml25
44 files changed, 1413 insertions, 497 deletions
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test
index 6368451..bd1c57d 100644
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test
+++ b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test
@@ -3,6 +3,7 @@
# Replace llc with cat, so we can simulate hypothetical output without actually running llc.
# Copy the simulated output to the temporary directory.
-# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments-O0.s %T/ && cp -f %S/Inputs/amdgpu_no_merge_comments-O3.s %T/
-# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments.ll %t.ll && %update_llc_test_checks --llc-binary cat %t.ll
-# RUN: diff -u %S/Inputs/amdgpu_no_merge_comments.ll.expected %t.ll
+# RUN: mkdir -p %t.dir
+# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments-O0.s %t.dir/ && cp -f %S/Inputs/amdgpu_no_merge_comments-O3.s %t.dir/
+# RUN: cp -f %S/Inputs/amdgpu_no_merge_comments.ll %t.dir/file.ll && %update_llc_test_checks --llc-binary cat %t.dir/file.ll
+# RUN: diff -u %S/Inputs/amdgpu_no_merge_comments.ll.expected %t.dir/file.ll
diff --git a/llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test b/llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test
index f2fe794..db223cd 100644
--- a/llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test
+++ b/llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test
@@ -5,7 +5,13 @@
# RUN: yaml2obj %t/stmt_seq_macho.o.yaml -o %t/stmt_seq_macho.o
# RUN: dsymutil --flat --verify-dwarf=none -oso-prepend-path %t %t/stmt_seq_macho.exe -o %t/stmt_seq_macho.dSYM
# RUN: llvm-dwarfdump --debug-info --debug-line -v %t/stmt_seq_macho.dSYM | sort | FileCheck %s -check-prefix=CHECK_DSYM
+# RUN: llvm-dwarfdump --debug-info --debug-line -v %t/stmt_seq_macho.dSYM > %t/stmt_seq_macho.dSYM.txt
+# RUN: cat %t/stmt_seq_macho.dSYM.txt | sort | FileCheck %s -check-prefix=CHECK_DSYM
+# RUN: cat %t/stmt_seq_macho.dSYM.txt | FileCheck %s -check-prefix=CHECK_NO_INVALID_OFFSET
+# RUN: cat stmt_seq_macho.dSYM.txt | grep DW_AT_LLVM_stmt_sequence | sort | uniq -d | wc -l | FileCheck %s -check-prefix=CHECK_NO_DUPLICATES
+# CHECK_NO_DUPLICATES: 0
+# CHECK_NO_INVALID_OFFSET-NOT: DW_AT_LLVM_stmt_sequence{{.*}}0xfffffff
# CHECK_DSYM: DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset] ([[OFFSET1:(0x[0-9a-f]+)]])
# CHECK_DSYM: DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset] ([[OFFSET2:(0x[0-9a-f]+)]])
# CHECK_DSYM: DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset] ([[OFFSET3:(0x[0-9a-f]+)]])
@@ -18,6 +24,9 @@
#--- stmt_seq_macho.cpp
#define ATTRIB extern "C" __attribute__((noinline))
+ATTRIB int function1_copy1(int a) {
+ return ++a;
+}
ATTRIB int function3_copy1(int a) {
int b = a + 3;
@@ -51,6 +60,7 @@ int main() {
sum += function2_copy2(3);
sum += function3_copy2(41);
sum += function2_copy1(11);
+ sum += function1_copy1(42);
length_error e("test");
return sum;
}
@@ -108,9 +118,9 @@ LoadCommands:
cmdsize: 1032
segname: ''
vmaddr: 0
- vmsize: 2793
+ vmsize: 3125
fileoff: 1208
- filesize: 2793
+ filesize: 3125
maxprot: 7
initprot: 7
nsects: 12
@@ -119,18 +129,18 @@ LoadCommands:
- sectname: __text
segname: __TEXT
addr: 0x0
- size: 128
+ size: 148
offset: 0x4B8
align: 2
- reloff: 0xFA8
- nreloc: 7
+ reloff: 0x10F0
+ nreloc: 8
flags: 0x80000400
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
- content: 00100011C0035FD600580051C0035FD600100011C0035FD600580051C0035FD6FFC300D1F44F01A9FD7B02A9FD8300916000805200000094F30300AA20058052000000941400130B6001805200000094F30300AA0100009021000091E03F0091000000948002130BFD7B42A9F44F41A9FFC30091C0035FD600000014C0035FD6
+ content: 00040011C0035FD600100011C0035FD600580051C0035FD600100011C0035FD600580051C0035FD6FFC300D1F44F01A9FD7B02A9FD8300916000805200000094F30300AA20058052000000941400130B6001805200000094F30300AA40058052000000947302000B0100009021000091E03F0091000000948002130BFD7B42A9F44F41A9FFC30091C0035FD600000014C0035FD6
relocations:
- - address: 0x78
+ - address: 0x8C
symbolnum: 4
pcrel: true
length: 2
@@ -138,7 +148,7 @@ LoadCommands:
type: 2
scattered: false
value: 0
- - address: 0x60
+ - address: 0x74
symbolnum: 3
pcrel: true
length: 2
@@ -146,7 +156,7 @@ LoadCommands:
type: 2
scattered: false
value: 0
- - address: 0x58
+ - address: 0x6C
symbolnum: 1
pcrel: false
length: 2
@@ -154,7 +164,7 @@ LoadCommands:
type: 4
scattered: false
value: 0
- - address: 0x54
+ - address: 0x68
symbolnum: 1
pcrel: true
length: 2
@@ -162,7 +172,7 @@ LoadCommands:
type: 3
scattered: false
value: 0
- - address: 0x4C
+ - address: 0x60
symbolnum: 5
pcrel: true
length: 2
@@ -170,16 +180,24 @@ LoadCommands:
type: 2
scattered: false
value: 0
- - address: 0x40
- symbolnum: 8
+ - address: 0x54
+ symbolnum: 6
pcrel: true
length: 2
extern: true
type: 2
scattered: false
value: 0
- - address: 0x34
- symbolnum: 6
+ - address: 0x48
+ symbolnum: 9
+ pcrel: true
+ length: 2
+ extern: true
+ type: 2
+ scattered: false
+ value: 0
+ - address: 0x3C
+ symbolnum: 7
pcrel: true
length: 2
extern: true
@@ -188,9 +206,9 @@ LoadCommands:
value: 0
- sectname: __cstring
segname: __TEXT
- addr: 0x80
+ addr: 0x94
size: 5
- offset: 0x538
+ offset: 0x54C
align: 0
reloff: 0x0
nreloc: 0
@@ -201,9 +219,9 @@ LoadCommands:
content: '7465737400'
- sectname: __debug_loc
segname: __DWARF
- addr: 0x85
+ addr: 0x99
size: 412
- offset: 0x53D
+ offset: 0x551
align: 0
reloff: 0x0
nreloc: 0
@@ -211,12 +229,12 @@ LoadCommands:
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
- content: 00000000000000000400000000000000010050040000000000000008000000000000000400A301509F0000000000000000000000000000000000000000000000000400000000000000030070039F0000000000000000000000000000000008000000000000000C000000000000000100500C0000000000000010000000000000000400A301509F0000000000000000000000000000000010000000000000001400000000000000010050140000000000000018000000000000000400A301509F0000000000000000000000000000000010000000000000001400000000000000030070039F0000000000000000000000000000000018000000000000001C000000000000000100501C0000000000000020000000000000000400A301509F000000000000000000000000000000001C0000000000000020000000000000000100500000000000000000000000000000000030000000000000003C00000000000000030011009F3C0000000000000048000000000000000100634800000000000000540000000000000001006400000000000000000000000000000000
+ content: 08000000000000000C000000000000000100500C0000000000000010000000000000000400A301509F0000000000000000000000000000000008000000000000000C00000000000000030070039F0000000000000000000000000000000010000000000000001400000000000000010050140000000000000018000000000000000400A301509F0000000000000000000000000000000018000000000000001C000000000000000100501C0000000000000020000000000000000400A301509F0000000000000000000000000000000018000000000000001C00000000000000030070039F0000000000000000000000000000000020000000000000002400000000000000010050240000000000000028000000000000000400A301509F00000000000000000000000000000000240000000000000028000000000000000100500000000000000000000000000000000038000000000000004400000000000000030011009F4400000000000000500000000000000001006350000000000000005C0000000000000001006400000000000000000000000000000000
- sectname: __debug_abbrev
segname: __DWARF
- addr: 0x221
- size: 359
- offset: 0x6D9
+ addr: 0x235
+ size: 372
+ offset: 0x6ED
align: 0
reloff: 0x0
nreloc: 0
@@ -226,18 +244,34 @@ LoadCommands:
reserved3: 0x0
- sectname: __debug_info
segname: __DWARF
- addr: 0x388
- size: 686
- offset: 0x840
+ addr: 0x3A9
+ size: 747
+ offset: 0x861
align: 0
- reloff: 0xFE0
- nreloc: 14
+ reloff: 0x1130
+ nreloc: 16
flags: 0x2000000
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
relocations:
- - address: 0x26A
+ - address: 0x2A7
+ symbolnum: 1
+ pcrel: false
+ length: 3
+ extern: false
+ type: 0
+ scattered: false
+ value: 0
+ - address: 0x28E
+ symbolnum: 1
+ pcrel: false
+ length: 3
+ extern: false
+ type: 0
+ scattered: false
+ value: 0
+ - address: 0x253
symbolnum: 1
pcrel: false
length: 3
@@ -245,7 +279,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x251
+ - address: 0x1F5
symbolnum: 1
pcrel: false
length: 3
@@ -253,7 +287,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x216
+ - address: 0x1E1
symbolnum: 1
pcrel: false
length: 3
@@ -261,7 +295,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x1B8
+ - address: 0x1CE
symbolnum: 1
pcrel: false
length: 3
@@ -269,7 +303,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x1A5
+ - address: 0x1BA
symbolnum: 1
pcrel: false
length: 3
@@ -277,7 +311,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x191
+ - address: 0x1A7
symbolnum: 1
pcrel: false
length: 3
@@ -285,7 +319,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x17E
+ - address: 0x169
symbolnum: 1
pcrel: false
length: 3
@@ -293,7 +327,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x140
+ - address: 0x12D
symbolnum: 1
pcrel: false
length: 3
@@ -301,7 +335,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x104
+ - address: 0xF1
symbolnum: 1
pcrel: false
length: 3
@@ -309,7 +343,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0xC8
+ - address: 0xC4
symbolnum: 1
pcrel: false
length: 3
@@ -317,7 +351,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x9B
+ - address: 0x88
symbolnum: 1
pcrel: false
length: 3
@@ -351,9 +385,9 @@ LoadCommands:
value: 0
- sectname: __debug_str
segname: __DWARF
- addr: 0x636
- size: 239
- offset: 0xAEE
+ addr: 0x694
+ size: 400
+ offset: 0xB4C
align: 0
reloff: 0x0
nreloc: 0
@@ -363,9 +397,9 @@ LoadCommands:
reserved3: 0x0
- sectname: __apple_names
segname: __DWARF
- addr: 0x725
- size: 260
- offset: 0xBDD
+ addr: 0x824
+ size: 288
+ offset: 0xCDC
align: 0
reloff: 0x0
nreloc: 0
@@ -373,12 +407,12 @@ LoadCommands:
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
- content: 485341480100000008000000080000000C000000000000000100000001000600000000000200000005000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90D9F86F88CB36CF4908311CD1125E5389CB36CF4A08311C522B70536A7F9A7C8000000094000000A4000000B4000000C4000000D4000000E4000000F40000008A0000000200000015020000690200000000000055000000010000009A0000000000000045000000010000005E00000000000000A3000000010000001502000000000000750000000100000003010000000000006500000001000000C700000000000000BB00000001000000690200000000000085000000010000003F01000000000000
+ content: 485341480100000009000000090000000C00000000000000010000000100060000000000FFFFFFFFFFFFFFFF0100000003000000040000000600000007000000080000004A08311CC78E3C8288CB36CF89CB36CFD1125E53522B705390D9F86F6A7F9A7C4908311C8C0000009C000000AC000000BC000000CC000000DC000000EC00000000010000100100000601000001000000F000000000000000D6000000010000005E00000000000000F600000001000000C30000000000000016010000010000002C01000000000000440100000100000052020000000000005C01000001000000A6020000000000002B0100000200000052020000A60200000000000026010000010000006801000000000000E6000000010000008700000000000000
- sectname: __apple_objc
segname: __DWARF
- addr: 0x829
+ addr: 0x944
size: 36
- offset: 0xCE1
+ offset: 0xDFC
align: 0
reloff: 0x0
nreloc: 0
@@ -389,9 +423,9 @@ LoadCommands:
content: 485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF
- sectname: __apple_namespac
segname: __DWARF
- addr: 0x84D
+ addr: 0x968
size: 36
- offset: 0xD05
+ offset: 0xE20
align: 0
reloff: 0x0
nreloc: 0
@@ -402,9 +436,9 @@ LoadCommands:
content: 485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF
- sectname: __apple_types
segname: __DWARF
- addr: 0x871
+ addr: 0x98C
size: 195
- offset: 0xD29
+ offset: 0xE44
align: 0
reloff: 0x0
nreloc: 0
@@ -412,21 +446,29 @@ LoadCommands:
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
- content: 48534148010000000500000005000000140000000000000003000000010006000300050004000B000000000002000000FFFFFFFF03000000040000007CA8F05D90D9F86F5B738CDC3080880B6320957C64000000770000008A0000009D000000B00000009700000001000000EA010000130000000000008A00000001000000C80100001300000000000031000000010000005700000024000000000000D300000001000000A1020000240000000000002C000000010000005000000024000000000000
+ content: 48534148010000000500000005000000140000000000000003000000010006000300050004000B000000000002000000FFFFFFFF03000000040000007CA8F05D90D9F86F5B738CDC3080880B6320957C64000000770000008A0000009D000000B0000000380100000100000027020000130000000000002B010000010000000502000013000000000000C20000000100000057000000240000000000007401000001000000DE02000024000000000000BD000000010000005000000024000000000000
- sectname: __debug_frame
segname: __DWARF
- addr: 0x938
- size: 208
- offset: 0xDF0
+ addr: 0xA50
+ size: 232
+ offset: 0xF08
align: 3
- reloff: 0x1050
- nreloc: 7
+ reloff: 0x11B0
+ nreloc: 8
flags: 0x2000000
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
- content: 14000000FFFFFFFF0400080001781E0C1F00000000000000140000000000000000000000000000000800000000000000140000000000000008000000000000000800000000000000140000000000000010000000000000000800000000000000140000000000000018000000000000000800000000000000240000000000000020000000000000005800000000000000500C1D109E019D02930394040000000014000000000000007800000000000000040000000000000014000000000000007C000000000000000400000000000000
+ content: 14000000FFFFFFFF0400080001781E0C1F00000000000000140000000000000000000000000000000800000000000000140000000000000008000000000000000800000000000000140000000000000010000000000000000800000000000000140000000000000018000000000000000800000000000000140000000000000020000000000000000800000000000000240000000000000028000000000000006400000000000000500C1D109E019D02930394040000000014000000000000008C000000000000000400000000000000140000000000000090000000000000000400000000000000
relocations:
+ - address: 0xD8
+ symbolnum: 1
+ pcrel: false
+ length: 3
+ extern: false
+ type: 0
+ scattered: false
+ value: 0
- address: 0xC0
symbolnum: 1
pcrel: false
@@ -435,7 +477,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0xA8
+ - address: 0x98
symbolnum: 1
pcrel: false
length: 3
@@ -485,18 +527,26 @@ LoadCommands:
value: 0
- sectname: __debug_line
segname: __DWARF
- addr: 0xA08
- size: 225
- offset: 0xEC0
+ addr: 0xB38
+ size: 253
+ offset: 0xFF0
align: 0
- reloff: 0x1088
- nreloc: 7
+ reloff: 0x11F0
+ nreloc: 8
flags: 0x2000000
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
relocations:
- - address: 0xD1
+ - address: 0xED
+ symbolnum: 1
+ pcrel: false
+ length: 3
+ extern: false
+ type: 0
+ scattered: false
+ value: 0
+ - address: 0xD9
symbolnum: 1
pcrel: false
length: 3
@@ -504,7 +554,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0xBD
+ - address: 0xAA
symbolnum: 1
pcrel: false
length: 3
@@ -512,7 +562,7 @@ LoadCommands:
type: 0
scattered: false
value: 0
- - address: 0x92
+ - address: 0x96
symbolnum: 1
pcrel: false
length: 3
@@ -560,21 +610,21 @@ LoadCommands:
ntools: 0
- cmd: LC_LINKER_OPTIMIZATION_HINT
cmdsize: 16
- dataoff: 4288
+ dataoff: 4656
datasize: 8
- cmd: LC_SYMTAB
cmdsize: 24
- symoff: 4296
- nsyms: 10
- stroff: 4456
- strsize: 144
+ symoff: 4664
+ nsyms: 11
+ stroff: 4840
+ strsize: 168
- cmd: LC_DYSYMTAB
cmdsize: 80
ilocalsym: 0
nlocalsym: 3
iextdefsym: 3
- nextdefsym: 7
- iundefsym: 10
+ nextdefsym: 8
+ iundefsym: 11
nundefsym: 0
tocoff: 0
ntoc: 0
@@ -590,7 +640,7 @@ LoadCommands:
nlocrel: 0
LinkEditData:
NameList:
- - n_strx: 138
+ - n_strx: 155
n_type: 0xE
n_sect: 1
n_desc: 0
@@ -599,47 +649,52 @@ LinkEditData:
n_type: 0xE
n_sect: 2
n_desc: 0
- n_value: 128
- - n_strx: 132
+ n_value: 148
+ - n_strx: 149
n_type: 0xE
n_sect: 2
n_desc: 0
- n_value: 128
+ n_value: 148
- n_strx: 39
n_type: 0xF
n_sect: 1
n_desc: 192
- n_value: 120
+ n_value: 140
- n_strx: 14
n_type: 0xF
n_sect: 1
n_desc: 192
- n_value: 124
+ n_value: 144
+ - n_strx: 132
+ n_type: 0xF
+ n_sect: 1
+ n_desc: 0
+ n_value: 0
- n_strx: 115
n_type: 0xF
n_sect: 1
n_desc: 0
- n_value: 8
+ n_value: 16
- n_strx: 81
n_type: 0xF
n_sect: 1
n_desc: 0
- n_value: 24
+ n_value: 32
- n_strx: 98
n_type: 0xF
n_sect: 1
n_desc: 0
- n_value: 0
+ n_value: 8
- n_strx: 64
n_type: 0xF
n_sect: 1
n_desc: 0
- n_value: 16
+ n_value: 24
- n_strx: 8
n_type: 0xF
n_sect: 1
n_desc: 0
- n_value: 32
+ n_value: 40
StringTable:
- ''
- l_.str
@@ -650,16 +705,25 @@ LinkEditData:
- _function2_copy2
- _function3_copy1
- _function2_copy1
+ - _function1_copy1
- ltmp1
- ltmp0
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
DWARF:
debug_str:
- - ''
+ - 'Facebook clang version 19.1.5 (https://git.internal.tfbnw.net/repos/git/rw/osmeta/external/llvm-project b36c9ae1f8f2b39e4aafb9ca4700c608c3036365)'
- stmt_seq_macho.cpp
- '/'
- '/private/tmp/stmt_seq'
- char
- __ARRAY_SIZE_TYPE__
+ - function1_copy1
- function3_copy1
- function2_copy1
- function3_copy2
@@ -786,6 +850,18 @@ DWARF:
Tag: DW_TAG_formal_parameter
Children: DW_CHILDREN_no
Attributes:
+ - Attribute: DW_AT_name
+ Form: DW_FORM_strp
+ - Attribute: DW_AT_decl_file
+ Form: DW_FORM_data1
+ - Attribute: DW_AT_decl_line
+ Form: DW_FORM_data1
+ - Attribute: DW_AT_type
+ Form: DW_FORM_ref4
+ - Code: 0xA
+ Tag: DW_TAG_formal_parameter
+ Children: DW_CHILDREN_no
+ Attributes:
- Attribute: DW_AT_location
Form: DW_FORM_sec_offset
- Attribute: DW_AT_name
@@ -796,7 +872,7 @@ DWARF:
Form: DW_FORM_data1
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- - Code: 0xA
+ - Code: 0xB
Tag: DW_TAG_variable
Children: DW_CHILDREN_no
Attributes:
@@ -810,7 +886,7 @@ DWARF:
Form: DW_FORM_data1
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- - Code: 0xB
+ - Code: 0xC
Tag: DW_TAG_subprogram
Children: DW_CHILDREN_yes
Attributes:
@@ -836,7 +912,7 @@ DWARF:
Form: DW_FORM_flag_present
- Attribute: DW_AT_APPLE_optimized
Form: DW_FORM_flag_present
- - Code: 0xC
+ - Code: 0xD
Tag: DW_TAG_variable
Children: DW_CHILDREN_no
Attributes:
@@ -850,7 +926,7 @@ DWARF:
Form: DW_FORM_data1
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- - Code: 0xD
+ - Code: 0xE
Tag: DW_TAG_call_site
Children: DW_CHILDREN_yes
Attributes:
@@ -858,7 +934,7 @@ DWARF:
Form: DW_FORM_ref4
- Attribute: DW_AT_call_return_pc
Form: DW_FORM_addr
- - Code: 0xE
+ - Code: 0xF
Tag: DW_TAG_call_site_parameter
Children: DW_CHILDREN_no
Attributes:
@@ -866,7 +942,7 @@ DWARF:
Form: DW_FORM_exprloc
- Attribute: DW_AT_call_value
Form: DW_FORM_exprloc
- - Code: 0xF
+ - Code: 0x10
Tag: DW_TAG_structure_type
Children: DW_CHILDREN_yes
Attributes:
@@ -880,7 +956,7 @@ DWARF:
Form: DW_FORM_data1
- Attribute: DW_AT_decl_line
Form: DW_FORM_data1
- - Code: 0x10
+ - Code: 0x11
Tag: DW_TAG_inheritance
Children: DW_CHILDREN_no
Attributes:
@@ -888,7 +964,7 @@ DWARF:
Form: DW_FORM_ref4
- Attribute: DW_AT_data_member_location
Form: DW_FORM_data1
- - Code: 0x11
+ - Code: 0x12
Tag: DW_TAG_subprogram
Children: DW_CHILDREN_yes
Attributes:
@@ -906,7 +982,7 @@ DWARF:
Form: DW_FORM_flag_present
- Attribute: DW_AT_explicit
Form: DW_FORM_flag_present
- - Code: 0x12
+ - Code: 0x13
Tag: DW_TAG_formal_parameter
Children: DW_CHILDREN_no
Attributes:
@@ -914,13 +990,13 @@ DWARF:
Form: DW_FORM_ref4
- Attribute: DW_AT_artificial
Form: DW_FORM_flag_present
- - Code: 0x13
+ - Code: 0x14
Tag: DW_TAG_formal_parameter
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- - Code: 0x14
+ - Code: 0x15
Tag: DW_TAG_subprogram
Children: DW_CHILDREN_yes
Attributes:
@@ -936,13 +1012,13 @@ DWARF:
Form: DW_FORM_flag_present
- Attribute: DW_AT_APPLE_optimized
Form: DW_FORM_flag_present
- - Code: 0x15
+ - Code: 0x16
Tag: DW_TAG_pointer_type
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- - Code: 0x16
+ - Code: 0x17
Tag: DW_TAG_subprogram
Children: DW_CHILDREN_yes
Attributes:
@@ -964,7 +1040,7 @@ DWARF:
Form: DW_FORM_strp
- Attribute: DW_AT_specification
Form: DW_FORM_ref4
- - Code: 0x17
+ - Code: 0x18
Tag: DW_TAG_formal_parameter
Children: DW_CHILDREN_no
Attributes:
@@ -976,7 +1052,7 @@ DWARF:
Form: DW_FORM_ref4
- Attribute: DW_AT_artificial
Form: DW_FORM_flag_present
- - Code: 0x18
+ - Code: 0x19
Tag: DW_TAG_formal_parameter
Children: DW_CHILDREN_no
Attributes:
@@ -990,7 +1066,7 @@ DWARF:
Form: DW_FORM_data1
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- - Code: 0x19
+ - Code: 0x1A
Tag: DW_TAG_call_site
Children: DW_CHILDREN_yes
Attributes:
@@ -1001,7 +1077,7 @@ DWARF:
- Attribute: DW_AT_call_pc
Form: DW_FORM_addr
debug_info:
- - Length: 0x2AA
+ - Length: 0x2E7
Version: 4
AbbrevTableID: 0
AbbrOffset: 0x0
@@ -1011,20 +1087,20 @@ DWARF:
Values:
- Value: 0x0
- Value: 0x21
- - Value: 0x1
- - Value: 0x14
+ - Value: 0x92
+ - Value: 0xA5
- Value: 0x0
- - Value: 0x16
+ - Value: 0xA7
- Value: 0x1
- Value: 0x0
- - Value: 0x80
+ - Value: 0x94
- AbbrCode: 0x2
Values:
- Value: 0x3F
- Value: 0x1
- - Value: 0x23
+ - Value: 0x27
- Value: 0x9
- BlockData: [ 0x3, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ BlockData: [ 0x3, 0x94, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0 ]
- AbbrCode: 0x3
Values:
@@ -1039,12 +1115,12 @@ DWARF:
- Value: 0x50
- AbbrCode: 0x6
Values:
- - Value: 0x2C
+ - Value: 0xBD
- Value: 0x6
- Value: 0x1
- AbbrCode: 0x7
Values:
- - Value: 0x31
+ - Value: 0xC2
- Value: 0x8
- Value: 0x7
- AbbrCode: 0x8
@@ -1056,285 +1132,318 @@ DWARF:
- Value: 0x1
BlockData: [ 0x6F ]
- Value: 0x1
- - Value: 0x45
+ - Value: 0xD6
- Value: 0x1
- - Value: 0x3
- - Value: 0x2A1
+ - Value: 0x2
+ - Value: 0x2DE
- Value: 0x1
- Value: 0x1
- AbbrCode: 0x9
Values:
- - Value: 0x0
- - Value: 0xD7
+ - Value: 0x178
+ - Value: 0x1
+ - Value: 0x2
+ - Value: 0x2DE
+ - AbbrCode: 0x0
+ - AbbrCode: 0x8
+ Values:
+ - Value: 0x8
+ - Value: 0x8
+ - Value: 0x1
+ - Value: 0x4A
+ - Value: 0x1
+ BlockData: [ 0x6F ]
+ - Value: 0x1
+ - Value: 0xE6
+ - Value: 0x1
+ - Value: 0x6
+ - Value: 0x2DE
+ - Value: 0x1
- Value: 0x1
- - Value: 0x3
- - Value: 0x2A1
- AbbrCode: 0xA
Values:
+ - Value: 0x0
+ - Value: 0x178
+ - Value: 0x1
+ - Value: 0x6
+ - Value: 0x2DE
+ - AbbrCode: 0xB
+ Values:
- Value: 0x39
- - Value: 0xD9
+ - Value: 0x17A
- Value: 0x1
- - Value: 0x4
- - Value: 0x2A1
+ - Value: 0x7
+ - Value: 0x2DE
- AbbrCode: 0x0
- AbbrCode: 0x8
Values:
- - Value: 0x8
+ - Value: 0x10
- Value: 0x8
- Value: 0x1
- - Value: 0x4A
+ - Value: 0x60
- Value: 0x1
BlockData: [ 0x6F ]
- Value: 0x1
- - Value: 0x55
+ - Value: 0xF6
- Value: 0x1
- - Value: 0x8
- - Value: 0x2A1
+ - Value: 0xB
+ - Value: 0x2DE
- Value: 0x1
- Value: 0x1
- - AbbrCode: 0x9
+ - AbbrCode: 0xA
Values:
- Value: 0x5E
- - Value: 0xD7
+ - Value: 0x178
- Value: 0x1
- - Value: 0x8
- - Value: 0x2A1
+ - Value: 0xB
+ - Value: 0x2DE
- AbbrCode: 0x0
- AbbrCode: 0x8
Values:
- - Value: 0x10
+ - Value: 0x18
- Value: 0x8
- Value: 0x1
- - Value: 0x60
+ - Value: 0x78
- Value: 0x1
BlockData: [ 0x6F ]
- Value: 0x1
- - Value: 0x65
+ - Value: 0x106
- Value: 0x1
- - Value: 0xC
- - Value: 0x2A1
+ - Value: 0xF
+ - Value: 0x2DE
- Value: 0x1
- Value: 0x1
- - AbbrCode: 0x9
+ - AbbrCode: 0xA
Values:
- Value: 0x97
- - Value: 0xD7
+ - Value: 0x178
- Value: 0x1
- - Value: 0xC
- - Value: 0x2A1
- - AbbrCode: 0xA
+ - Value: 0xF
+ - Value: 0x2DE
+ - AbbrCode: 0xB
Values:
- Value: 0xD0
- - Value: 0xD9
+ - Value: 0x17A
- Value: 0x1
- - Value: 0xD
- - Value: 0x2A1
+ - Value: 0x10
+ - Value: 0x2DE
- AbbrCode: 0x0
- AbbrCode: 0x8
Values:
- - Value: 0x18
+ - Value: 0x20
- Value: 0x8
- Value: 0x1
- - Value: 0x78
+ - Value: 0x90
- Value: 0x1
BlockData: [ 0x6F ]
- Value: 0x1
- - Value: 0x75
+ - Value: 0x116
- Value: 0x1
- - Value: 0x11
- - Value: 0x2A1
+ - Value: 0x14
+ - Value: 0x2DE
- Value: 0x1
- Value: 0x1
- - AbbrCode: 0x9
+ - AbbrCode: 0xA
Values:
- Value: 0xF5
- - Value: 0xD7
+ - Value: 0x178
- Value: 0x1
- - Value: 0x11
- - Value: 0x2A1
- - AbbrCode: 0xA
+ - Value: 0x14
+ - Value: 0x2DE
+ - AbbrCode: 0xB
Values:
- Value: 0x12E
- - Value: 0xDB
+ - Value: 0x17C
- Value: 0x1
- - Value: 0x12
- - Value: 0x2A1
+ - Value: 0x15
+ - Value: 0x2DE
- AbbrCode: 0x0
- - AbbrCode: 0xB
+ - AbbrCode: 0xC
Values:
- - Value: 0x20
- - Value: 0x58
- - Value: 0x8F
+ - Value: 0x28
+ - Value: 0x64
+ - Value: 0xA7
- Value: 0x1
BlockData: [ 0x6D ]
- Value: 0x1
- - Value: 0x85
+ - Value: 0x126
- Value: 0x1
- - Value: 0x1E
- - Value: 0x2A1
+ - Value: 0x21
+ - Value: 0x2DE
- Value: 0x1
- Value: 0x1
- - AbbrCode: 0xC
+ - AbbrCode: 0xD
Values:
- Value: 0x2
BlockData: [ 0x8F, 0xF ]
- - Value: 0xE2
+ - Value: 0x183
- Value: 0x1
- - Value: 0x23
- - Value: 0x1C8
- - AbbrCode: 0xA
+ - Value: 0x27
+ - Value: 0x205
+ - AbbrCode: 0xB
Values:
- Value: 0x151
- - Value: 0xE4
+ - Value: 0x185
- Value: 0x1
- - Value: 0x1F
- - Value: 0x2A1
- - AbbrCode: 0xD
- Values:
- - Value: 0x103
- - Value: 0x38
+ - Value: 0x22
+ - Value: 0x2DE
- AbbrCode: 0xE
Values:
+ - Value: 0x12C
+ - Value: 0x40
+ - AbbrCode: 0xF
+ Values:
- Value: 0x1
BlockData: [ 0x50 ]
- Value: 0x1
BlockData: [ 0x33 ]
- AbbrCode: 0x0
- - AbbrCode: 0xD
- Values:
- - Value: 0xC7
- - Value: 0x44
- AbbrCode: 0xE
Values:
+ - Value: 0xF0
+ - Value: 0x4C
+ - AbbrCode: 0xF
+ Values:
- Value: 0x1
BlockData: [ 0x50 ]
- Value: 0x2
BlockData: [ 0x10, 0x29 ]
- AbbrCode: 0x0
- - AbbrCode: 0xD
- Values:
- - Value: 0x9A
- - Value: 0x50
- AbbrCode: 0xE
Values:
+ - Value: 0xC3
+ - Value: 0x58
+ - AbbrCode: 0xF
+ Values:
- Value: 0x1
BlockData: [ 0x50 ]
- Value: 0x1
BlockData: [ 0x3B ]
- AbbrCode: 0x0
- - AbbrCode: 0xD
+ - AbbrCode: 0xE
Values:
- - Value: 0x215
+ - Value: 0x5E
- Value: 0x64
+ - AbbrCode: 0xF
+ Values:
+ - Value: 0x1
+ BlockData: [ 0x50 ]
+ - Value: 0x2
+ BlockData: [ 0x10, 0x2A ]
+ - AbbrCode: 0x0
- AbbrCode: 0xE
Values:
+ - Value: 0x252
+ - Value: 0x78
+ - AbbrCode: 0xF
+ Values:
- Value: 0x1
BlockData: [ 0x50 ]
- Value: 0x2
BlockData: [ 0x8F, 0xF ]
- AbbrCode: 0x0
- AbbrCode: 0x0
- - AbbrCode: 0xF
+ - AbbrCode: 0x10
Values:
- Value: 0x5
- - Value: 0x8A
+ - Value: 0x12B
- Value: 0x1
- Value: 0x1
- - Value: 0x1A
- - AbbrCode: 0x10
+ - Value: 0x1D
+ - AbbrCode: 0x11
Values:
- - Value: 0x1EA
+ - Value: 0x227
- Value: 0x0
- - AbbrCode: 0x11
+ - AbbrCode: 0x12
Values:
- - Value: 0x8A
+ - Value: 0x12B
- Value: 0x1
- - Value: 0x1B
+ - Value: 0x1E
- Value: 0x1
- Value: 0x1
- Value: 0x1
- Value: 0x1
- - AbbrCode: 0x12
+ - AbbrCode: 0x13
Values:
- - Value: 0x210
+ - Value: 0x24D
- Value: 0x1
- - AbbrCode: 0x13
+ - AbbrCode: 0x14
Values:
- - Value: 0x20B
+ - Value: 0x248
- AbbrCode: 0x0
- AbbrCode: 0x0
- - AbbrCode: 0xF
+ - AbbrCode: 0x10
Values:
- Value: 0x5
- - Value: 0x97
+ - Value: 0x138
- Value: 0x1
- Value: 0x1
- - Value: 0x16
- - AbbrCode: 0x14
+ - Value: 0x19
+ - AbbrCode: 0x15
Values:
- - Value: 0x97
+ - Value: 0x138
- Value: 0x1
- - Value: 0x17
+ - Value: 0x1A
- Value: 0x1
- Value: 0x1
- Value: 0x1
- - AbbrCode: 0x12
+ - AbbrCode: 0x13
Values:
- - Value: 0x206
+ - Value: 0x243
- Value: 0x1
- - AbbrCode: 0x13
+ - AbbrCode: 0x14
Values:
- - Value: 0x20B
+ - Value: 0x248
- AbbrCode: 0x0
- AbbrCode: 0x0
- - AbbrCode: 0x15
+ - AbbrCode: 0x16
Values:
- - Value: 0x1EA
- - AbbrCode: 0x15
+ - Value: 0x227
+ - AbbrCode: 0x16
Values:
- Value: 0x4B
- - AbbrCode: 0x15
- Values:
- - Value: 0x1C8
- AbbrCode: 0x16
Values:
- - Value: 0x78
+ - Value: 0x205
+ - AbbrCode: 0x17
+ Values:
+ - Value: 0x8C
- Value: 0x4
- Value: 0x1
- - Value: 0xB7
+ - Value: 0xD3
- Value: 0x1
BlockData: [ 0x6F ]
- - Value: 0x234
+ - Value: 0x271
- Value: 0x1
- - Value: 0xA3
- - Value: 0x1D7
- - AbbrCode: 0x17
+ - Value: 0x144
+ - Value: 0x214
+ - AbbrCode: 0x18
Values:
- Value: 0x1
BlockData: [ 0x50 ]
- - Value: 0xE8
- - Value: 0x2A8
+ - Value: 0x189
+ - Value: 0x2E5
- Value: 0x1
- - AbbrCode: 0x18
+ - AbbrCode: 0x19
Values:
- Value: 0x1
BlockData: [ 0x51 ]
- - Value: 0xED
+ - Value: 0x18E
- Value: 0x1
- - Value: 0x1B
- - Value: 0x20B
- - AbbrCode: 0x19
+ - Value: 0x1E
+ - Value: 0x248
+ - AbbrCode: 0x1A
Values:
- - Value: 0x269
+ - Value: 0x2A6
- Value: 0x1
- - Value: 0x78
- - AbbrCode: 0xE
+ - Value: 0x8C
+ - AbbrCode: 0xF
Values:
- Value: 0x1
BlockData: [ 0x50 ]
- Value: 0x3
BlockData: [ 0xA3, 0x1, 0x50 ]
- - AbbrCode: 0xE
+ - AbbrCode: 0xF
Values:
- Value: 0x1
BlockData: [ 0x51 ]
@@ -1342,45 +1451,45 @@ DWARF:
BlockData: [ 0xA3, 0x1, 0x51 ]
- AbbrCode: 0x0
- AbbrCode: 0x0
- - AbbrCode: 0x16
+ - AbbrCode: 0x17
Values:
- - Value: 0x7C
+ - Value: 0x90
- Value: 0x4
- Value: 0x1
- - Value: 0xCB
+ - Value: 0xE7
- Value: 0x1
BlockData: [ 0x6F ]
- - Value: 0x288
+ - Value: 0x2C5
- Value: 0x1
- - Value: 0xBB
- - Value: 0x1D7
- - AbbrCode: 0x17
+ - Value: 0x15C
+ - Value: 0x214
+ - AbbrCode: 0x18
Values:
- Value: 0x1
BlockData: [ 0x50 ]
- - Value: 0xE8
- - Value: 0x2A8
+ - Value: 0x189
+ - Value: 0x2E5
- Value: 0x1
- - AbbrCode: 0x18
+ - AbbrCode: 0x19
Values:
- Value: 0x1
BlockData: [ 0x51 ]
- - Value: 0xED
+ - Value: 0x18E
- Value: 0x1
- - Value: 0x1B
- - Value: 0x20B
+ - Value: 0x1E
+ - Value: 0x248
- AbbrCode: 0x0
- AbbrCode: 0x6
Values:
- - Value: 0xD3
+ - Value: 0x174
- Value: 0x5
- Value: 0x4
- - AbbrCode: 0x15
+ - AbbrCode: 0x16
Values:
- - Value: 0x1C8
+ - Value: 0x205
- AbbrCode: 0x0
debug_line:
- - Length: 221
+ - Length: 249
Version: 4
PrologueLength: 42
MinInstLength: 1
@@ -1397,17 +1506,17 @@ DWARF:
Length: 0
Opcodes:
- Opcode: DW_LNS_set_column
- Data: 14
+ Data: 10
- Opcode: DW_LNS_set_prologue_end
Data: 0
- Opcode: DW_LNS_extended_op
ExtLen: 9
SubOpcode: DW_LNE_set_address
Data: 0
- - Opcode: 0x16
+ - Opcode: 0x14
Data: 0
- Opcode: DW_LNS_set_column
- Data: 5
+ Data: 3
- Opcode: DW_LNS_negate_stmt
Data: 0
- Opcode: 0x4A
@@ -1424,7 +1533,7 @@ DWARF:
ExtLen: 9
SubOpcode: DW_LNE_set_address
Data: 8
- - Opcode: 0x1A
+ - Opcode: 0x19
Data: 0
- Opcode: DW_LNS_set_column
Data: 5
@@ -1445,7 +1554,7 @@ DWARF:
SubOpcode: DW_LNE_set_address
Data: 16
- Opcode: DW_LNS_advance_line
- SData: 13
+ SData: 11
Data: 0
- Opcode: DW_LNS_copy
Data: 0
@@ -1460,7 +1569,7 @@ DWARF:
SubOpcode: DW_LNE_end_sequence
Data: 0
- Opcode: DW_LNS_set_column
- Data: 20
+ Data: 14
- Opcode: DW_LNS_set_prologue_end
Data: 0
- Opcode: DW_LNS_extended_op
@@ -1468,24 +1577,47 @@ DWARF:
SubOpcode: DW_LNE_set_address
Data: 24
- Opcode: DW_LNS_advance_line
- SData: 17
+ SData: 16
Data: 0
- Opcode: DW_LNS_copy
Data: 0
- Opcode: DW_LNS_set_column
Data: 5
- - Opcode: 0x4B
+ - Opcode: DW_LNS_negate_stmt
+ Data: 0
+ - Opcode: 0x4A
Data: 0
- Opcode: DW_LNS_extended_op
ExtLen: 1
SubOpcode: DW_LNE_end_sequence
Data: 0
+ - Opcode: DW_LNS_set_column
+ Data: 20
+ - Opcode: DW_LNS_set_prologue_end
+ Data: 0
- Opcode: DW_LNS_extended_op
ExtLen: 9
SubOpcode: DW_LNE_set_address
Data: 32
- Opcode: DW_LNS_advance_line
- SData: 29
+ SData: 20
+ Data: 0
+ - Opcode: DW_LNS_copy
+ Data: 0
+ - Opcode: DW_LNS_set_column
+ Data: 5
+ - Opcode: 0x4B
+ Data: 0
+ - Opcode: DW_LNS_extended_op
+ ExtLen: 1
+ SubOpcode: DW_LNE_end_sequence
+ Data: 0
+ - Opcode: DW_LNS_extended_op
+ ExtLen: 9
+ SubOpcode: DW_LNE_set_address
+ Data: 40
+ - Opcode: DW_LNS_advance_line
+ SData: 32
Data: 0
- Opcode: DW_LNS_copy
Data: 0
@@ -1509,9 +1641,15 @@ DWARF:
Data: 0
- Opcode: 0x4B
Data: 0
+ - Opcode: 0xBB
+ Data: 0
+ - Opcode: DW_LNS_set_column
+ Data: 9
+ - Opcode: 0x81
+ Data: 0
- Opcode: DW_LNS_set_column
Data: 18
- - Opcode: 0xBB
+ - Opcode: 0x4C
Data: 0
- Opcode: DW_LNS_set_column
Data: 9
@@ -1534,9 +1672,9 @@ DWARF:
- Opcode: DW_LNS_extended_op
ExtLen: 9
SubOpcode: DW_LNE_set_address
- Data: 120
+ Data: 140
- Opcode: DW_LNS_advance_line
- SData: 26
+ SData: 29
Data: 0
- Opcode: DW_LNS_copy
Data: 0
@@ -1551,9 +1689,9 @@ DWARF:
- Opcode: DW_LNS_extended_op
ExtLen: 9
SubOpcode: DW_LNE_set_address
- Data: 124
+ Data: 144
- Opcode: DW_LNS_advance_line
- SData: 26
+ SData: 29
Data: 0
- Opcode: DW_LNS_copy
Data: 0
@@ -1604,7 +1742,7 @@ LoadCommands:
- sectname: __text
segname: __TEXT
addr: 0x1000002F0
- size: 112
+ size: 132
offset: 0x2F0
align: 2
reloff: 0x0
@@ -1613,12 +1751,12 @@ LoadCommands:
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
- content: 00580051C0035FD600100011C0035FD6FFC300D1F44F01A9FD7B02A9FD83009160008052F7FFFF97F30300AA20058052F6FFFF971400130B60018052F1FFFF97F30300AA610100101F2003D5E03F0091060000948002130BFD7B42A9F44F41A9FFC30091C0035FD601000014C0035FD6
+ content: 00040011C0035FD600580051C0035FD600100011C0035FD6FFC300D1F44F01A9FD7B02A9FD83009160008052F7FFFF97F30300AA20058052F6FFFF971400130B60018052F1FFFF97F30300AA40058052ECFFFF977302000B610100101F2003D5E03F0091060000948002130BFD7B42A9F44F41A9FFC30091C0035FD601000014C0035FD6
- sectname: __cstring
segname: __TEXT
- addr: 0x100000360
+ addr: 0x100000374
size: 5
- offset: 0x360
+ offset: 0x374
align: 0
reloff: 0x0
nreloc: 0
@@ -1631,9 +1769,9 @@ LoadCommands:
cmdsize: 72
segname: __LINKEDIT
vmaddr: 4294983680
- vmsize: 960
+ vmsize: 1040
fileoff: 16384
- filesize: 960
+ filesize: 1040
maxprot: 1
initprot: 1
nsects: 0
@@ -1649,20 +1787,20 @@ LoadCommands:
lazy_bind_off: 0
lazy_bind_size: 0
export_off: 16384
- export_size: 96
+ export_size: 112
- cmd: LC_SYMTAB
cmdsize: 24
- symoff: 16488
- nsyms: 22
- stroff: 16840
- strsize: 192
+ symoff: 16504
+ nsyms: 25
+ stroff: 16904
+ strsize: 208
- cmd: LC_DYSYMTAB
cmdsize: 80
ilocalsym: 0
- nlocalsym: 17
- iextdefsym: 17
- nextdefsym: 5
- iundefsym: 22
+ nlocalsym: 19
+ iextdefsym: 19
+ nextdefsym: 6
+ iundefsym: 25
nundefsym: 0
tocoff: 0
ntoc: 0
@@ -1683,7 +1821,7 @@ LoadCommands:
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
- uuid: 4C4C4480-5555-3144-A138-E5DA50CC68DB
+ uuid: 4C4C443F-5555-3144-A15F-DE084AB2A15B
- cmd: LC_BUILD_VERSION
cmdsize: 32
platform: 1
@@ -1692,22 +1830,22 @@ LoadCommands:
ntools: 1
Tools:
- tool: 4
- version: 1376256
+ version: 1245445
- cmd: LC_MAIN
cmdsize: 24
- entryoff: 768
+ entryoff: 776
stacksize: 0
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
- dataoff: 16480
+ dataoff: 16496
datasize: 8
- cmd: LC_DATA_IN_CODE
cmdsize: 16
- dataoff: 16488
+ dataoff: 16504
datasize: 0
- cmd: LC_CODE_SIGNATURE
cmdsize: 16
- dataoff: 17040
+ dataoff: 17120
datasize: 304
LinkEditData:
ExportTrie:
@@ -1738,7 +1876,7 @@ LinkEditData:
NodeOffset: 47
Name: main
Flags: 0x0
- Address: 0x300
+ Address: 0x308
Other: 0x0
ImportName: ''
- TerminalSize: 0
@@ -1749,8 +1887,15 @@ LinkEditData:
Other: 0x0
ImportName: ''
Children:
+ - TerminalSize: 3
+ NodeOffset: 80
+ Name: 1_copy1
+ Flags: 0x0
+ Address: 0x2F0
+ Other: 0x0
+ ImportName: ''
- TerminalSize: 0
- NodeOffset: 71
+ NodeOffset: 85
Name: 2_copy
Flags: 0x0
Address: 0x0
@@ -1758,52 +1903,52 @@ LinkEditData:
ImportName: ''
Children:
- TerminalSize: 3
- NodeOffset: 79
+ NodeOffset: 93
Name: '1'
Flags: 0x0
- Address: 0x2F0
+ Address: 0x2F8
Other: 0x0
ImportName: ''
- TerminalSize: 3
- NodeOffset: 84
+ NodeOffset: 98
Name: '2'
Flags: 0x0
- Address: 0x2F0
+ Address: 0x2F8
Other: 0x0
ImportName: ''
- TerminalSize: 3
- NodeOffset: 89
+ NodeOffset: 103
Name: 3_copy2
Flags: 0x0
- Address: 0x2F8
+ Address: 0x300
Other: 0x0
ImportName: ''
NameList:
- - n_strx: 129
+ - n_strx: 146
n_type: 0x64
n_sect: 0
n_desc: 0
n_value: 0
- - n_strx: 170
+ - n_strx: 187
n_type: 0x66
n_sect: 0
n_desc: 1
n_value: 0
- - n_strx: 59
+ - n_strx: 76
n_type: 0x24
n_sect: 1
n_desc: 0
- n_value: 4294968152
+ n_value: 4294968172
- n_strx: 1
n_type: 0x24
n_sect: 0
n_desc: 0
n_value: 4
- - n_strx: 84
+ - n_strx: 101
n_type: 0x24
n_sect: 1
n_desc: 0
- n_value: 4294968156
+ n_value: 4294968176
- n_strx: 1
n_type: 0x24
n_sect: 0
@@ -1813,12 +1958,12 @@ LinkEditData:
n_type: 0x24
n_sect: 1
n_desc: 0
- n_value: 4294968064
+ n_value: 4294968072
- n_strx: 1
n_type: 0x24
n_sect: 0
n_desc: 0
- n_value: 88
+ n_value: 100
- n_strx: 8
n_type: 0x24
n_sect: 1
@@ -1843,7 +1988,17 @@ LinkEditData:
n_type: 0x24
n_sect: 1
n_desc: 0
- n_value: 4294968048
+ n_value: 4294968064
+ - n_strx: 1
+ n_type: 0x24
+ n_sect: 0
+ n_desc: 0
+ n_value: 8
+ - n_strx: 59
+ n_type: 0x24
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294968056
- n_strx: 1
n_type: 0x24
n_sect: 0
@@ -1854,21 +2009,21 @@ LinkEditData:
n_sect: 1
n_desc: 0
n_value: 0
- - n_strx: 59
+ - n_strx: 76
n_type: 0x1E
n_sect: 1
n_desc: 0
- n_value: 4294968152
- - n_strx: 84
+ n_value: 4294968172
+ - n_strx: 101
n_type: 0x1E
n_sect: 1
n_desc: 0
- n_value: 4294968156
+ n_value: 4294968176
- n_strx: 2
n_type: 0xF
n_sect: 1
n_desc: 0
- n_value: 4294968064
+ n_value: 4294968072
- n_strx: 8
n_type: 0xF
n_sect: 1
@@ -1883,8 +2038,13 @@ LinkEditData:
n_type: 0xF
n_sect: 1
n_desc: 0
- n_value: 4294968048
- - n_strx: 109
+ n_value: 4294968064
+ - n_strx: 59
+ n_type: 0xF
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294968056
+ - n_strx: 126
n_type: 0xF
n_sect: 1
n_desc: 16
@@ -1892,6 +2052,7 @@ LinkEditData:
StringTable:
- ' '
- _main
+ - _function1_copy1
- _function2_copy1
- _function3_copy2
- _function2_copy2
@@ -1904,6 +2065,5 @@ LinkEditData:
- ''
- ''
- ''
- - ''
- FunctionStarts: [ 0x2F0, 0x2F8, 0x300, 0x358, 0x35C ]
+ FunctionStarts: [ 0x2F0, 0x2F8, 0x300, 0x308, 0x36C, 0x370 ]
...
diff --git a/llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test b/llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
index bc59414..70a263b 100644
--- a/llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
+++ b/llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test
@@ -1,12 +1,13 @@
-RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
-RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
-RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
-RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
+RUN: rm -rf %t && mkdir %t
+RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
+RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
+RUN: llvm-readobj --sections --section-data %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
+RUN: llvm-dwarfdump --show-section-sizes %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
-RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
-RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
-RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
-RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
+RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
+RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %t/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
+RUN: llvm-readobj --sections --section-data %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
+RUN: llvm-dwarfdump --show-section-sizes %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
The tested object file has been created by the dummy Swift code:
@@ -27,5 +28,5 @@ READOBJ-NEXT: |.|
DWARFDUMP: __swift_ast
-RUN: dsymutil -s %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=NAST
+RUN: dsymutil -s %t/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=NAST
NAST-NOT: N_AST
diff --git a/llvm/test/tools/llvm-dwarfdump/dump_dwo.test b/llvm/test/tools/llvm-dwarfdump/dump_dwo.test
index 7405955..c5f22a2 100644
--- a/llvm/test/tools/llvm-dwarfdump/dump_dwo.test
+++ b/llvm/test/tools/llvm-dwarfdump/dump_dwo.test
@@ -1,9 +1,10 @@
## Check that llvm-dwarfdump works when dumping .o files with .dwo files.
-# RUN: yaml2obj %p/Inputs/dump_dwo.o.yaml -o %T/dump_dwo.o
-# RUN: yaml2obj %p/Inputs/dump_dwo.dwo.yaml -o %T/dump_dwo.dwo
+# RUN: mkdir -p %t.dir
+# RUN: yaml2obj %p/Inputs/dump_dwo.o.yaml -o %t.dir/dump_dwo.o
+# RUN: yaml2obj %p/Inputs/dump_dwo.dwo.yaml -o %t.dir/dump_dwo.dwo
## We need to be in the same directory so we can find .dwo file
-# RUN: cd %T
+# RUN: cd %t.dir
# RUN: llvm-dwarfdump --dwo dump_dwo.o | FileCheck %s
# RUN: llvm-dwarfdump --dwo --name int --name char dump_dwo.o | FileCheck %s --check-prefix=NAMES
# RUN: llvm-dwarfdump --name int --name char dump_dwo.o | FileCheck %s --check-prefix=NAMES_NO_DWO
diff --git a/llvm/test/tools/llvm-ir2vec/entities.ll b/llvm/test/tools/llvm-ir2vec/entities.ll
new file mode 100644
index 0000000..57c3d6f
--- /dev/null
+++ b/llvm/test/tools/llvm-ir2vec/entities.ll
@@ -0,0 +1,95 @@
+; RUN: llvm-ir2vec --mode=entities | FileCheck %s
+
+CHECK: 92
+CHECK-NEXT: Ret 0
+CHECK-NEXT: Br 1
+CHECK-NEXT: Switch 2
+CHECK-NEXT: IndirectBr 3
+CHECK-NEXT: Invoke 4
+CHECK-NEXT: Resume 5
+CHECK-NEXT: Unreachable 6
+CHECK-NEXT: CleanupRet 7
+CHECK-NEXT: CatchRet 8
+CHECK-NEXT: CatchSwitch 9
+CHECK-NEXT: CallBr 10
+CHECK-NEXT: FNeg 11
+CHECK-NEXT: Add 12
+CHECK-NEXT: FAdd 13
+CHECK-NEXT: Sub 14
+CHECK-NEXT: FSub 15
+CHECK-NEXT: Mul 16
+CHECK-NEXT: FMul 17
+CHECK-NEXT: UDiv 18
+CHECK-NEXT: SDiv 19
+CHECK-NEXT: FDiv 20
+CHECK-NEXT: URem 21
+CHECK-NEXT: SRem 22
+CHECK-NEXT: FRem 23
+CHECK-NEXT: Shl 24
+CHECK-NEXT: LShr 25
+CHECK-NEXT: AShr 26
+CHECK-NEXT: And 27
+CHECK-NEXT: Or 28
+CHECK-NEXT: Xor 29
+CHECK-NEXT: Alloca 30
+CHECK-NEXT: Load 31
+CHECK-NEXT: Store 32
+CHECK-NEXT: GetElementPtr 33
+CHECK-NEXT: Fence 34
+CHECK-NEXT: AtomicCmpXchg 35
+CHECK-NEXT: AtomicRMW 36
+CHECK-NEXT: Trunc 37
+CHECK-NEXT: ZExt 38
+CHECK-NEXT: SExt 39
+CHECK-NEXT: FPToUI 40
+CHECK-NEXT: FPToSI 41
+CHECK-NEXT: UIToFP 42
+CHECK-NEXT: SIToFP 43
+CHECK-NEXT: FPTrunc 44
+CHECK-NEXT: FPExt 45
+CHECK-NEXT: PtrToInt 46
+CHECK-NEXT: IntToPtr 47
+CHECK-NEXT: BitCast 48
+CHECK-NEXT: AddrSpaceCast 49
+CHECK-NEXT: CleanupPad 50
+CHECK-NEXT: CatchPad 51
+CHECK-NEXT: ICmp 52
+CHECK-NEXT: FCmp 53
+CHECK-NEXT: PHI 54
+CHECK-NEXT: Call 55
+CHECK-NEXT: Select 56
+CHECK-NEXT: UserOp1 57
+CHECK-NEXT: UserOp2 58
+CHECK-NEXT: VAArg 59
+CHECK-NEXT: ExtractElement 60
+CHECK-NEXT: InsertElement 61
+CHECK-NEXT: ShuffleVector 62
+CHECK-NEXT: ExtractValue 63
+CHECK-NEXT: InsertValue 64
+CHECK-NEXT: LandingPad 65
+CHECK-NEXT: Freeze 66
+CHECK-NEXT: FloatTy 67
+CHECK-NEXT: FloatTy 68
+CHECK-NEXT: FloatTy 69
+CHECK-NEXT: FloatTy 70
+CHECK-NEXT: FloatTy 71
+CHECK-NEXT: FloatTy 72
+CHECK-NEXT: FloatTy 73
+CHECK-NEXT: VoidTy 74
+CHECK-NEXT: LabelTy 75
+CHECK-NEXT: MetadataTy 76
+CHECK-NEXT: UnknownTy 77
+CHECK-NEXT: TokenTy 78
+CHECK-NEXT: IntegerTy 79
+CHECK-NEXT: FunctionTy 80
+CHECK-NEXT: PointerTy 81
+CHECK-NEXT: StructTy 82
+CHECK-NEXT: ArrayTy 83
+CHECK-NEXT: VectorTy 84
+CHECK-NEXT: VectorTy 85
+CHECK-NEXT: PointerTy 86
+CHECK-NEXT: UnknownTy 87
+CHECK-NEXT: Function 88
+CHECK-NEXT: Pointer 89
+CHECK-NEXT: Constant 90
+CHECK-NEXT: Variable 91
diff --git a/llvm/test/tools/llvm-ir2vec/error-handling.ll b/llvm/test/tools/llvm-ir2vec/error-handling.ll
new file mode 100644
index 0000000..c23c529
--- /dev/null
+++ b/llvm/test/tools/llvm-ir2vec/error-handling.ll
@@ -0,0 +1,22 @@
+; Test error handling and input validation for llvm-ir2vec tool
+
+; RUN: not llvm-ir2vec --mode=embeddings %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-VOCAB
+
+; RUN: not llvm-ir2vec --mode=embeddings --function=nonexistent --ir2vec-vocab-path=%ir2vec_test_vocab_dir/dummy_3D_nonzero_opc_vocab.json %s 2>&1 | FileCheck %s -check-prefix=CHECK-FUNC-NOT-FOUND
+
+; RUN: llvm-ir2vec --mode=triplets --ir2vec-vocab-path=%ir2vec_test_vocab_dir/dummy_3D_nonzero_opc_vocab.json --level=inst %s 2>&1 | FileCheck %s -check-prefix=CHECK-UNUSED-LEVEL
+; RUN: llvm-ir2vec --mode=entities --level=inst %s 2>&1 | FileCheck %s -check-prefix=CHECK-UNUSED-LEVEL
+
+; RUN: llvm-ir2vec --mode=triplets --ir2vec-vocab-path=%ir2vec_test_vocab_dir/dummy_3D_nonzero_opc_vocab.json --function=dummy %s 2>&1 | FileCheck %s -check-prefix=CHECK-UNUSED-FUNC
+; RUN: llvm-ir2vec --mode=entities --function=dummy %s 2>&1 | FileCheck %s -check-prefix=CHECK-UNUSED-FUNC
+
+; Simple test function for valid IR
+define i32 @test_func(i32 %a) {
+entry:
+ ret i32 %a
+}
+
+; CHECK-NO-VOCAB: error: IR2Vec vocabulary file path not specified; You may need to set it using --ir2vec-vocab-path
+; CHECK-FUNC-NOT-FOUND: Error: Function 'nonexistent' not found
+; CHECK-UNUSED-LEVEL: Warning: --level option is ignored
+; CHECK-UNUSED-FUNC: Warning: --function option is ignored
diff --git a/llvm/test/tools/llvm-ir2vec/triplets.ll b/llvm/test/tools/llvm-ir2vec/triplets.ll
index d1ef5b3..dcd1dc9 100644
--- a/llvm/test/tools/llvm-ir2vec/triplets.ll
+++ b/llvm/test/tools/llvm-ir2vec/triplets.ll
@@ -24,15 +24,42 @@ entry:
ret i32 %result
}
-; TRIPLETS: Add IntegerTy Variable Variable
-; TRIPLETS-NEXT: Ret VoidTy Variable
-; TRIPLETS-NEXT: Mul IntegerTy Variable Variable
-; TRIPLETS-NEXT: Ret VoidTy Variable
-; TRIPLETS-NEXT: Alloca PointerTy Constant
-; TRIPLETS-NEXT: Alloca PointerTy Constant
-; TRIPLETS-NEXT: Store VoidTy Variable Pointer
-; TRIPLETS-NEXT: Store VoidTy Variable Pointer
-; TRIPLETS-NEXT: Load IntegerTy Pointer
-; TRIPLETS-NEXT: Load IntegerTy Pointer
-; TRIPLETS-NEXT: Add IntegerTy Variable Variable
-; TRIPLETS-NEXT: Ret VoidTy Variable
+; TRIPLETS: MAX_RELATION=3
+; TRIPLETS-NEXT: 12 79 0
+; TRIPLETS-NEXT: 12 91 2
+; TRIPLETS-NEXT: 12 91 3
+; TRIPLETS-NEXT: 12 0 1
+; TRIPLETS-NEXT: 0 74 0
+; TRIPLETS-NEXT: 0 91 2
+; TRIPLETS-NEXT: 16 79 0
+; TRIPLETS-NEXT: 16 91 2
+; TRIPLETS-NEXT: 16 91 3
+; TRIPLETS-NEXT: 16 0 1
+; TRIPLETS-NEXT: 0 74 0
+; TRIPLETS-NEXT: 0 91 2
+; TRIPLETS-NEXT: 30 81 0
+; TRIPLETS-NEXT: 30 90 2
+; TRIPLETS-NEXT: 30 30 1
+; TRIPLETS-NEXT: 30 81 0
+; TRIPLETS-NEXT: 30 90 2
+; TRIPLETS-NEXT: 30 32 1
+; TRIPLETS-NEXT: 32 74 0
+; TRIPLETS-NEXT: 32 91 2
+; TRIPLETS-NEXT: 32 89 3
+; TRIPLETS-NEXT: 32 32 1
+; TRIPLETS-NEXT: 32 74 0
+; TRIPLETS-NEXT: 32 91 2
+; TRIPLETS-NEXT: 32 89 3
+; TRIPLETS-NEXT: 32 31 1
+; TRIPLETS-NEXT: 31 79 0
+; TRIPLETS-NEXT: 31 89 2
+; TRIPLETS-NEXT: 31 31 1
+; TRIPLETS-NEXT: 31 79 0
+; TRIPLETS-NEXT: 31 89 2
+; TRIPLETS-NEXT: 31 12 1
+; TRIPLETS-NEXT: 12 79 0
+; TRIPLETS-NEXT: 12 91 2
+; TRIPLETS-NEXT: 12 91 3
+; TRIPLETS-NEXT: 12 0 1
+; TRIPLETS-NEXT: 0 74 0
+; TRIPLETS-NEXT: 0 91 2
diff --git a/llvm/test/tools/llvm-libtool-darwin/L-and-l.test b/llvm/test/tools/llvm-libtool-darwin/L-and-l.test
index 43a88f5..e8a5885 100644
--- a/llvm/test/tools/llvm-libtool-darwin/L-and-l.test
+++ b/llvm/test/tools/llvm-libtool-darwin/L-and-l.test
@@ -1,112 +1,113 @@
## This test checks that -l and -L options work correctly.
-# RUN: yaml2obj %S/Inputs/input1.yaml -o %t-input1.o
-# RUN: yaml2obj %S/Inputs/input2.yaml -o %t-input2.o
+# RUN: mkdir -p %t.dir
+# RUN: yaml2obj %S/Inputs/input1.yaml -o %t.dir/input1.o
+# RUN: yaml2obj %S/Inputs/input2.yaml -o %t.dir/input2.o
## Check that the library is recognised when it ends with '.o':
-# RUN: llvm-libtool-darwin -static -o %t.lib -l%basename_t.tmp-input1.o -l%basename_t.tmp-input2.o -L%T
+# RUN: llvm-libtool-darwin -static -o %t.lib -linput1.o -linput2.o -L%t.dir
# RUN: llvm-ar t %t.lib | \
-# RUN: FileCheck %s --check-prefix=CHECK-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
+# RUN: FileCheck %s --check-prefix=CHECK-NAMES --implicit-check-not={{.}}
# RUN: llvm-nm --print-armap %t.lib | \
-# RUN: FileCheck %s --check-prefix=CHECK-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
+# RUN: FileCheck %s --check-prefix=CHECK-SYMBOLS --match-full-lines
-# CHECK-NAMES: [[PREFIX]]-input1.o
-# CHECK-NAMES-NEXT: [[PREFIX]]-input2.o
+# CHECK-NAMES: input1.o
+# CHECK-NAMES-NEXT: input2.o
# CHECK-SYMBOLS: Archive map
-# CHECK-SYMBOLS-NEXT: _symbol1 in [[PREFIX]]-input1.o
-# CHECK-SYMBOLS-NEXT: _symbol2 in [[PREFIX]]-input2.o
+# CHECK-SYMBOLS-NEXT: _symbol1 in input1.o
+# CHECK-SYMBOLS-NEXT: _symbol2 in input2.o
# CHECK-SYMBOLS-EMPTY:
## Check that the library is recognised when prepended with 'lib' and appended with '.a':
# RUN: rm -rf %t/dirname && mkdir -p %t/dirname
-# RUN: llvm-ar cr %t/dirname/libinput2.a %t-input2.o
+# RUN: llvm-ar cr %t/dirname/libinput2.a %t.dir/input2.o
# RUN: llvm-libtool-darwin -static -o %t.lib -linput2 -L%t/dirname
# RUN: llvm-ar t %t.lib | \
-# RUN: FileCheck %s --check-prefix=SINGLE-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
+# RUN: FileCheck %s --check-prefix=SINGLE-NAMES --implicit-check-not={{.}}
# RUN: llvm-nm --print-armap %t.lib | \
-# RUN: FileCheck %s --check-prefix=SINGLE-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
+# RUN: FileCheck %s --check-prefix=SINGLE-SYMBOLS --match-full-lines
-# SINGLE-NAMES: [[PREFIX]]-input2.o
+# SINGLE-NAMES: input2.o
# SINGLE-SYMBOLS: Archive map
-# SINGLE-SYMBOLS-NEXT: _symbol2 in [[PREFIX]]-input2.o
+# SINGLE-SYMBOLS-NEXT: _symbol2 in input2.o
# SINGLE-SYMBOLS-EMPTY:
## -l and -L option specified multiple times:
# RUN: rm -rf %t/otherDirname && mkdir -p %t/otherDirname
-# RUN: llvm-ar cr %t/otherDirname/libinput1.a %t-input1.o
+# RUN: llvm-ar cr %t/otherDirname/libinput1.a %t.dir/input1.o
# RUN: llvm-libtool-darwin -static -o %t.lib -linput2 -linput1 -L%t/dirname -L%t/otherDirname
# RUN: llvm-ar t %t.lib | \
-# RUN: FileCheck %s --check-prefix=OTHER-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
+# RUN: FileCheck %s --check-prefix=OTHER-NAMES --implicit-check-not={{.}}
# RUN: llvm-nm --print-armap %t.lib | \
-# RUN: FileCheck %s --check-prefix=OTHER-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
+# RUN: FileCheck %s --check-prefix=OTHER-SYMBOLS --match-full-lines
## Check it is possible to pass arguments to -l and -L separated from the option
## and the options specified multiple times:
# RUN: rm -rf %t/otherDirname && mkdir -p %t/otherDirname
-# RUN: llvm-ar cr %t/otherDirname/libinput1.a %t-input1.o
+# RUN: llvm-ar cr %t/otherDirname/libinput1.a %t.dir/input1.o
# RUN: llvm-libtool-darwin -static -o %t.lib -l input2 -l input1 -L %t/dirname -L %t/otherDirname
# RUN: llvm-ar t %t.lib | \
-# RUN: FileCheck %s --check-prefix=OTHER-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
+# RUN: FileCheck %s --check-prefix=OTHER-NAMES --implicit-check-not={{.}}
# RUN: llvm-nm --print-armap %t.lib | \
-# RUN: FileCheck %s --check-prefix=OTHER-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
+# RUN: FileCheck %s --check-prefix=OTHER-SYMBOLS --match-full-lines
-# OTHER-NAMES: [[PREFIX]]-input2.o
-# OTHER-NAMES-NEXT: [[PREFIX]]-input1.o
+# OTHER-NAMES: input2.o
+# OTHER-NAMES-NEXT: input1.o
# OTHER-SYMBOLS: Archive map
-# OTHER-SYMBOLS-NEXT: _symbol2 in [[PREFIX]]-input2.o
-# OTHER-SYMBOLS-NEXT: _symbol1 in [[PREFIX]]-input1.o
+# OTHER-SYMBOLS-NEXT: _symbol2 in input2.o
+# OTHER-SYMBOLS-NEXT: _symbol1 in input1.o
# OTHER-SYMBOLS-EMPTY:
## Check that if multiple directories specified with -L have the same named file
## in them, the file from the first directory is selected.
-# RUN: llvm-ar cr %t/otherDirname/libinput2.a %t-input1.o
+# RUN: llvm-ar cr %t/otherDirname/libinput2.a %t.dir/input1.o
# RUN: llvm-libtool-darwin -static -o %t.lib -linput2 -L%t/dirname -L%t/otherDirname
# RUN: llvm-ar t %t.lib | \
-# RUN: FileCheck %s --check-prefix=SINGLE-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
+# RUN: FileCheck %s --check-prefix=SINGLE-NAMES --implicit-check-not={{.}}
# RUN: llvm-nm --print-armap %t.lib | \
-# RUN: FileCheck %s --check-prefix=SINGLE-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
+# RUN: FileCheck %s --check-prefix=SINGLE-SYMBOLS --match-full-lines
## Check that if two different files with the same names are explicitly
## specified, the command gives a warning.
-# RUN: cp %t-input2.o %t/dirname
+# RUN: cp %t.dir/input2.o %t/dirname
# RUN: llvm-libtool-darwin -static -o %t.lib \
-# RUN: %t/dirname/%basename_t.tmp-input2.o %t-input2.o 2>&1 | \
+# RUN: %t/dirname/input2.o %t.dir/input2.o 2>&1 | \
# RUN: FileCheck %s --check-prefix=DUPLICATE-INPUT \
-# RUN: -DFILE=%basename_t.tmp-input2.o \
-# RUN: -DINPUTA=%t/dirname/%basename_t.tmp-input2.o \
-# RUN: -DINPUTB=%t-input2.o
+# RUN: -DFILE=input2.o \
+# RUN: -DINPUTA=%t/dirname/input2.o \
+# RUN: -DINPUTB=%t.dir/input2.o
# DUPLICATE-INPUT: warning: file '[[FILE]]' was specified multiple times.
# DUPLICATE-INPUT-DAG: [[INPUTA]]
# DUPLICATE-INPUT-DAG: [[INPUTB]]
## -l option combined with an input file:
-# RUN: llvm-libtool-darwin -static -o %t.lib %t-input1.o -linput2 -L%t/dirname
+# RUN: llvm-libtool-darwin -static -o %t.lib %t.dir/input1.o -linput2 -L%t/dirname
# RUN: llvm-ar t %t.lib | \
-# RUN: FileCheck %s --check-prefix=CHECK-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
+# RUN: FileCheck %s --check-prefix=CHECK-NAMES --implicit-check-not={{.}}
# RUN: llvm-nm --print-armap %t.lib | \
-# RUN: FileCheck %s --check-prefix=CHECK-SYMBOLS -DPREFIX=%basename_t.tmp --match-full-lines
+# RUN: FileCheck %s --check-prefix=CHECK-SYMBOLS --match-full-lines
## Specify the same file with a -l option and an input file:
# RUN: rm -rf %t/copy
# RUN: mkdir -p %t/copy
-# RUN: cp %t-input1.o %t/copy
+# RUN: cp %t.dir/input1.o %t/copy
# RUN: llvm-libtool-darwin -static -o %t.lib \
-# RUN: %t/copy/%basename_t.tmp-input1.o -l%basename_t.tmp-input1.o -L%t/copy 2>&1 | \
-# RUN: FileCheck %s --check-prefix=DUPLICATE-L-INPUT -DFILE=%basename_t.tmp-input1.o
+# RUN: %t/copy/input1.o -linput1.o -L%t/copy 2>&1 | \
+# RUN: FileCheck %s --check-prefix=DUPLICATE-L-INPUT -DFILE=input1.o
## Specify same -l option twice:
-# RUN: llvm-libtool-darwin -static -o %t.lib -l%basename_t.tmp-input1.o \
-# RUN: -l%basename_t.tmp-input1.o -L%t/copy 2>&1 | \
+# RUN: llvm-libtool-darwin -static -o %t.lib -linput1.o \
+# RUN: -linput1.o -L%t/copy 2>&1 | \
# RUN: FileCheck %s --check-prefix=DUPLICATE-L-INPUT \
-# RUN: -DFILE=%basename_t.tmp-input1.o
+# RUN: -DFILE=input1.o
# DUPLICATE-L-INPUT: warning: file '[[FILE]]' was specified multiple times.
@@ -123,11 +124,11 @@
## Check that an error is thrown when the input library cannot be found
## (since 'lib' and '.a' are added):
-# RUN: llvm-ar cr %t/dirname/file-does-exist %t-input1.o
+# RUN: llvm-ar cr %t/dirname/file-does-exist %t.dir/input1.o
# RUN: not llvm-libtool-darwin -static -o %t.lib -lfile-does-exist -L%t/dirname 2>&1 | \
# RUN: FileCheck %s --check-prefix=NOT-FOUND -DFILE=libfile-does-exist.a
-# RUN: llvm-ar cr %t/dirname/libfile-does-exist.a %t-input1.o
+# RUN: llvm-ar cr %t/dirname/libfile-does-exist.a %t.dir/input1.o
# RUN: not llvm-libtool-darwin -static -o %t.lib -llibfile-does-exist.a -L%t/dirname 2>&1 | \
# RUN: FileCheck %s --check-prefix=NOT-FOUND -DFILE=liblibfile-does-exist.a.a
@@ -145,13 +146,13 @@
# RUN: FileCheck %s --check-prefix=NOT-VALID -DFILE=libnot-valid.a
## Check that 'lib' and '.a' are not added to a file ending in '.o':
-# RUN: llvm-ar cr %t/dirname/libfoo.o.a %t-input1.o
+# RUN: llvm-ar cr %t/dirname/libfoo.o.a %t.dir/input1.o
# RUN: not llvm-libtool-darwin -static -o %t.lib -lfoo.o -L%t/dirname 2>&1 | \
# RUN: FileCheck %s --check-prefix=NOT-FOUND -DFILE=foo.o
## Check that 'lib' and '.a' are added to a file ending in any other extension
## beside '.o' (e.g. '.ext'):
-# RUN: llvm-ar cr %t/dirname/libbar.ext.a %t-input2.o
+# RUN: llvm-ar cr %t/dirname/libbar.ext.a %t.dir/input2.o
# RUN: llvm-libtool-darwin -static -o %t.lib -lbar.ext -L%t/dirname
# RUN: llvm-ar t %t.lib | \
# RUN: FileCheck %s --check-prefix=SINGLE-NAMES --implicit-check-not={{.}} -DPREFIX=%basename_t.tmp
diff --git a/llvm/test/tools/llvm-mc/disassembler-profile.test b/llvm/test/tools/llvm-mc/disassembler-profile.test
new file mode 100644
index 0000000..67afdce
--- /dev/null
+++ b/llvm/test/tools/llvm-mc/disassembler-profile.test
@@ -0,0 +1,12 @@
+# REQUIRES: aarch64-registered-target
+# RUN: rm -rf %t.json
+# RUN: llvm-mc -triple=aarch64 -disassemble -o /dev/null %s -runs=1000 -time-trace -time-trace-file=%t.json
+# RUN: FileCheck --input-file %t.json %s
+
+# Note: Test input taken from llvm/test/MC/Disassembler/AArch64/udf.txt
+
+# CHECK: "name":"Total getInstruction"
+# CHECK: "args":{"count":3,"avg ms":{{.*}}}
+[0x00,0x00,0x00,0x00]
+[0x01,0x02,0x00,0x00]
+[0xff,0xff,0x00,0x00]
diff --git a/llvm/test/tools/llvm-objcopy/COFF/dump-section.test b/llvm/test/tools/llvm-objcopy/COFF/dump-section.test
index 591135a..e96febc 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/dump-section.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/dump-section.test
@@ -4,7 +4,7 @@
# RUN: llvm-objcopy --dump-section .text.f=%t.txt %t.obj
# RUN: od -t x1 %t.txt | FileCheck %s --ignore-case -check-prefix CHECK-TEXT-F
# RUN: not llvm-objcopy --dump-section non-existent=/dev/null %t.obj 2>&1 | FileCheck %s -check-prefix CHECK-NO-SECTION
-# RUN: not llvm-objcopy --dump-section .text=%T %t.obj 2>&1 | FileCheck -DOBJ=%t.obj -DMSG=%errc_EISDIR %s -check-prefix CHECK-INVALID-DESTINATION
+# RUN: not llvm-objcopy --dump-section .text=%S %t.obj 2>&1 | FileCheck -DOBJ=%t.obj -DMSG=%errc_EISDIR %s -check-prefix CHECK-INVALID-DESTINATION
# CHECK-EMPTY-SIZE: 0
diff --git a/llvm/test/tools/llvm-objcopy/COFF/exe-bogus-assoc.test b/llvm/test/tools/llvm-objcopy/COFF/exe-bogus-assoc.test
new file mode 100644
index 0000000..12f14b5
--- /dev/null
+++ b/llvm/test/tools/llvm-objcopy/COFF/exe-bogus-assoc.test
@@ -0,0 +1,134 @@
+## Test that bogus associative section symbols in executables are ignored.
+##
+## The executable contains two (bogus) associative section symbols, both for
+## (parts of) the .rdata section; one pointing at the .debug_info section
+## (which will be stripped out) and one pointing at a nonexistent section.
+##
+## Check that stripping does succeed, and that it doesn't end up removing
+## the .rdata section.
+
+# RUN: yaml2obj %s -o %t.in.exe
+
+# RUN: llvm-strip --strip-debug %t.in.exe -o %t.out.exe
+# RUN: llvm-readobj --sections %t.out.exe | FileCheck %s
+
+# CHECK: Name: .rdata
+
+--- !COFF
+OptionalHeader:
+ AddressOfEntryPoint: 4096
+ ImageBase: 5368709120
+ SectionAlignment: 4096
+ FileAlignment: 512
+ MajorOperatingSystemVersion: 4
+ MinorOperatingSystemVersion: 0
+ MajorImageVersion: 0
+ MinorImageVersion: 0
+ MajorSubsystemVersion: 5
+ MinorSubsystemVersion: 2
+ Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
+ DLLCharacteristics: [ ]
+ SizeOfStackReserve: 2097152
+ SizeOfStackCommit: 4096
+ SizeOfHeapReserve: 1048576
+ SizeOfHeapCommit: 4096
+header:
+ Machine: IMAGE_FILE_MACHINE_AMD64
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ VirtualAddress: 4096
+ VirtualSize: 48
+ SectionData: E806000000E802000000C3C3C30F1F00FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF0000000000000000
+ SizeOfRawData: 512
+ - Name: .rdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ VirtualAddress: 8192
+ VirtualSize: 4
+ SectionData: '00000000'
+ SizeOfRawData: 512
+ - Name: .debug_info
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ VirtualAddress: 16384
+ VirtualSize: 4
+ SectionData: '00000000'
+ SizeOfRawData: 512
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 11
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 1703692295
+ Number: 1
+ - Name: '.text$func1'
+ Value: 11
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 1
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 40735498
+ Number: 3
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: .rdata
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 1
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 3
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.text$func2'
+ Value: 12
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 1
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 40735498
+ Number: 4
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: .rdata
+ Value: 1
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 1
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 4
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: .debug_info
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 4
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+...
diff --git a/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofexe
index f69c0b1..fc530a4 100755
--- a/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofexe
+++ b/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofraw
index ed679dc..d492076 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofraw
+++ b/llvm/test/tools/llvm-profdata/Inputs/basic-histogram.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/basic.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/basic.memprofexe
index 14cbfeb..8810ee1 100755
--- a/llvm/test/tools/llvm-profdata/Inputs/basic.memprofexe
+++ b/llvm/test/tools/llvm-profdata/Inputs/basic.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/basic.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/basic.memprofraw
index c3ac49e..6943c18 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/basic.memprofraw
+++ b/llvm/test/tools/llvm-profdata/Inputs/basic.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofexe
new file mode 100755
index 0000000..14cbfeb
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofraw
new file mode 100644
index 0000000..c3ac49e
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/Inputs/basic_v4.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofexe
index 1b4db88..4ab8040 100755
--- a/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofexe
+++ b/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofraw
index e959e76..c6aec8d 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofraw
+++ b/llvm/test/tools/llvm-profdata/Inputs/buildid.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/inline.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/inline.memprofexe
index 2822f2f..5af6c81 100755
--- a/llvm/test/tools/llvm-profdata/Inputs/inline.memprofexe
+++ b/llvm/test/tools/llvm-profdata/Inputs/inline.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/inline.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/inline.memprofraw
index 05deb2e..8958af9 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/inline.memprofraw
+++ b/llvm/test/tools/llvm-profdata/Inputs/inline.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/multi.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/multi.memprofexe
index 22c6136..e9ec22c 100755
--- a/llvm/test/tools/llvm-profdata/Inputs/multi.memprofexe
+++ b/llvm/test/tools/llvm-profdata/Inputs/multi.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/multi.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/multi.memprofraw
index 364aa1c..3952768 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/multi.memprofraw
+++ b/llvm/test/tools/llvm-profdata/Inputs/multi.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofexe
index 34db7e7..e50f663 100755
--- a/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofexe
+++ b/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofraw
index 7a7d3a6..df6fcb1 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofraw
+++ b/llvm/test/tools/llvm-profdata/Inputs/padding-histogram.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/pic.memprofexe b/llvm/test/tools/llvm-profdata/Inputs/pic.memprofexe
index f7d1723..63eea44 100755
--- a/llvm/test/tools/llvm-profdata/Inputs/pic.memprofexe
+++ b/llvm/test/tools/llvm-profdata/Inputs/pic.memprofexe
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/Inputs/pic.memprofraw b/llvm/test/tools/llvm-profdata/Inputs/pic.memprofraw
index 0920028..b6a733a 100644
--- a/llvm/test/tools/llvm-profdata/Inputs/pic.memprofraw
+++ b/llvm/test/tools/llvm-profdata/Inputs/pic.memprofraw
Binary files differ
diff --git a/llvm/test/tools/llvm-profdata/memprof-basic-histogram.test b/llvm/test/tools/llvm-profdata/memprof-basic-histogram.test
index 3d30a62..ce534db 100644
--- a/llvm/test/tools/llvm-profdata/memprof-basic-histogram.test
+++ b/llvm/test/tools/llvm-profdata/memprof-basic-histogram.test
@@ -7,7 +7,7 @@ We expect 5 MIBs, each with different AccessHistogramValues.
CHECK: MemprofProfile:
CHECK-NEXT: Summary:
-CHECK-NEXT: Version: 4
+CHECK-NEXT: Version: 5
CHECK-NEXT: NumSegments: {{[0-9]+}}
CHECK-NEXT: NumMibInfo: 5
CHECK-NEXT: NumAllocFunctions: 3
@@ -241,4 +241,4 @@ CHECK-NEXT: MinLifetimeAccessDensity: 56000
CHECK-NEXT: MaxLifetimeAccessDensity: 56000
CHECK-NEXT: AccessHistogramSize: 8
CHECK-NEXT: AccessHistogram: {{[0-9]+}}
-CHECK-NEXT: AccessHistogramValues: 168 147 126 105 84 63 42 21 \ No newline at end of file
+CHECK-NEXT: AccessHistogramValues: 168 147 126 105 84 63 42 21
diff --git a/llvm/test/tools/llvm-profdata/memprof-basic.test b/llvm/test/tools/llvm-profdata/memprof-basic.test
index e15df50..81550eb 100644
--- a/llvm/test/tools/llvm-profdata/memprof-basic.test
+++ b/llvm/test/tools/llvm-profdata/memprof-basic.test
@@ -8,7 +8,7 @@ additional allocations which do not originate from the main binary are pruned.
CHECK: MemprofProfile:
CHECK-NEXT: Summary:
-CHECK-NEXT: Version: 4
+CHECK-NEXT: Version: 5
CHECK-NEXT: NumSegments: {{[0-9]+}}
CHECK-NEXT: NumMibInfo: 2
CHECK-NEXT: NumAllocFunctions: 1
@@ -96,4 +96,4 @@ CHECK-NEXT: TotalLifetimeAccessDensity: 20000
CHECK-NEXT: MinLifetimeAccessDensity: 20000
CHECK-NEXT: MaxLifetimeAccessDensity: 20000
CHECK-NEXT: AccessHistogramSize: 0
-CHECK-NEXT: AccessHistogram: 0 \ No newline at end of file
+CHECK-NEXT: AccessHistogram: 0
diff --git a/llvm/test/tools/llvm-profdata/memprof-basic_v4.test b/llvm/test/tools/llvm-profdata/memprof-basic_v4.test
new file mode 100644
index 0000000..79d4fe2
--- /dev/null
+++ b/llvm/test/tools/llvm-profdata/memprof-basic_v4.test
@@ -0,0 +1,102 @@
+REQUIRES: x86_64-linux
+
+This is a copy of memprof-basic.test with slight changes to check that we can still read v3 of memprofraw.
+
+Inputs cannot and should not be updated.
+
+RUN: llvm-profdata show --memory %p/Inputs/basic_v4.memprofraw --profiled-binary %p/Inputs/basic_v4.memprofexe -o - | FileCheck %s
+
+We expect 2 MIB entries, 1 each for the malloc calls in the program. Any
+additional allocations which do not originate from the main binary are pruned.
+
+CHECK: MemprofProfile:
+CHECK-NEXT: Summary:
+CHECK-NEXT: Version: 4
+CHECK-NEXT: NumSegments: {{[0-9]+}}
+CHECK-NEXT: NumMibInfo: 2
+CHECK-NEXT: NumAllocFunctions: 1
+CHECK-NEXT: NumStackOffsets: 2
+CHECK-NEXT: Segments:
+CHECK-NEXT: -
+CHECK-NEXT: BuildId: {{[[:xdigit:]]+}}
+CHECK-NEXT: Start: 0x{{[[:xdigit:]]+}}
+CHECK-NEXT: End: 0x{{[[:xdigit:]]+}}
+CHECK-NEXT: Offset: 0x{{[[:xdigit:]]+}}
+CHECK-NEXT: -
+
+CHECK: Records:
+CHECK-NEXT: -
+CHECK-NEXT: FunctionGUID: {{[0-9]+}}
+CHECK-NEXT: AllocSites:
+CHECK-NEXT: -
+CHECK-NEXT: Callstack:
+CHECK-NEXT: -
+CHECK-NEXT: Function: {{[0-9]+}}
+CHECK-NEXT: SymbolName: main
+CHECK-NEXT: LineOffset: 1
+CHECK-NEXT: Column: 21
+CHECK-NEXT: Inline: 0
+CHECK-NEXT: MemInfoBlock:
+CHECK-NEXT: AllocCount: 1
+CHECK-NEXT: TotalAccessCount: 2
+CHECK-NEXT: MinAccessCount: 2
+CHECK-NEXT: MaxAccessCount: 2
+CHECK-NEXT: TotalSize: 10
+CHECK-NEXT: MinSize: 10
+CHECK-NEXT: MaxSize: 10
+CHECK-NEXT: AllocTimestamp: {{[0-9]+}}
+CHECK-NEXT: DeallocTimestamp: {{[0-9]+}}
+CHECK-NEXT: TotalLifetime: 0
+CHECK-NEXT: MinLifetime: 0
+CHECK-NEXT: MaxLifetime: 0
+CHECK-NEXT: AllocCpuId: {{[0-9]+}}
+CHECK-NEXT: DeallocCpuId: {{[0-9]+}}
+CHECK-NEXT: NumMigratedCpu: 0
+CHECK-NEXT: NumLifetimeOverlaps: 0
+CHECK-NEXT: NumSameAllocCpu: 0
+CHECK-NEXT: NumSameDeallocCpu: 0
+CHECK-NEXT: DataTypeId: {{[0-9]+}}
+CHECK-NEXT: TotalAccessDensity: 20
+CHECK-NEXT: MinAccessDensity: 20
+CHECK-NEXT: MaxAccessDensity: 20
+CHECK-NEXT: TotalLifetimeAccessDensity: 20000
+CHECK-NEXT: MinLifetimeAccessDensity: 20000
+CHECK-NEXT: MaxLifetimeAccessDensity: 20000
+CHECK-NEXT: AccessHistogramSize: 0
+CHECK-NEXT: AccessHistogram: 0
+CHECK-NEXT: -
+CHECK-NEXT: Callstack:
+CHECK-NEXT: -
+CHECK-NEXT: Function: {{[0-9]+}}
+CHECK-NEXT: SymbolName: main
+CHECK-NEXT: LineOffset: 4
+CHECK-NEXT: Column: 15
+CHECK-NEXT: Inline: 0
+CHECK-NEXT: MemInfoBlock:
+CHECK-NEXT: AllocCount: 1
+CHECK-NEXT: TotalAccessCount: 2
+CHECK-NEXT: MinAccessCount: 2
+CHECK-NEXT: MaxAccessCount: 2
+CHECK-NEXT: TotalSize: 10
+CHECK-NEXT: MinSize: 10
+CHECK-NEXT: MaxSize: 10
+CHECK-NEXT: AllocTimestamp: {{[0-9]+}}
+CHECK-NEXT: DeallocTimestamp: {{[0-9]+}}
+CHECK-NEXT: TotalLifetime: 0
+CHECK-NEXT: MinLifetime: 0
+CHECK-NEXT: MaxLifetime: 0
+CHECK-NEXT: AllocCpuId: {{[0-9]+}}
+CHECK-NEXT: DeallocCpuId: {{[0-9]+}}
+CHECK-NEXT: NumMigratedCpu: 0
+CHECK-NEXT: NumLifetimeOverlaps: 0
+CHECK-NEXT: NumSameAllocCpu: 0
+CHECK-NEXT: NumSameDeallocCpu: 0
+CHECK-NEXT: DataTypeId: {{[0-9]+}}
+CHECK-NEXT: TotalAccessDensity: 20
+CHECK-NEXT: MinAccessDensity: 20
+CHECK-NEXT: MaxAccessDensity: 20
+CHECK-NEXT: TotalLifetimeAccessDensity: 20000
+CHECK-NEXT: MinLifetimeAccessDensity: 20000
+CHECK-NEXT: MaxLifetimeAccessDensity: 20000
+CHECK-NEXT: AccessHistogramSize: 0
+CHECK-NEXT: AccessHistogram: 0
diff --git a/llvm/test/tools/llvm-profdata/memprof-inline.test b/llvm/test/tools/llvm-profdata/memprof-inline.test
index 79ce2ad..4a3f620 100644
--- a/llvm/test/tools/llvm-profdata/memprof-inline.test
+++ b/llvm/test/tools/llvm-profdata/memprof-inline.test
@@ -5,7 +5,7 @@ RUN: llvm-profdata show --memory %p/Inputs/inline.memprofraw --profiled-binary %
CHECK: MemprofProfile:
CHECK-NEXT: Summary:
-CHECK-NEXT: Version: 4
+CHECK-NEXT: Version: 5
CHECK-NEXT: NumSegments: {{[0-9]+}}
CHECK-NEXT: NumMibInfo: 2
CHECK-NEXT: NumAllocFunctions: 2
diff --git a/llvm/test/tools/llvm-profdata/memprof-multi.test b/llvm/test/tools/llvm-profdata/memprof-multi.test
index 6243982..35f94df 100644
--- a/llvm/test/tools/llvm-profdata/memprof-multi.test
+++ b/llvm/test/tools/llvm-profdata/memprof-multi.test
@@ -7,7 +7,7 @@ We expect 2 MIB entries, 1 each for the malloc calls in the program.
CHECK: MemprofProfile:
CHECK-NEXT: Summary:
-CHECK-NEXT: Version: 4
+CHECK-NEXT: Version: 5
CHECK-NEXT: NumSegments: {{[0-9]+}}
CHECK-NEXT: NumMibInfo: 2
CHECK-NEXT: NumAllocFunctions: 1
diff --git a/llvm/test/tools/llvm-profdata/memprof-padding-histogram.test b/llvm/test/tools/llvm-profdata/memprof-padding-histogram.test
index 4ba58e3..2d0346e 100644
--- a/llvm/test/tools/llvm-profdata/memprof-padding-histogram.test
+++ b/llvm/test/tools/llvm-profdata/memprof-padding-histogram.test
@@ -7,7 +7,7 @@ We expect 2 different MIBs with histogram values. This test is to make sure we p
CHECK: MemprofProfile:
CHECK-NEXT: Summary:
-CHECK-NEXT: Version: 4
+CHECK-NEXT: Version: 5
CHECK-NEXT: NumSegments: {{[0-9]+}}
CHECK-NEXT: NumMibInfo: 2
CHECK-NEXT: NumAllocFunctions: 1
@@ -21,79 +21,79 @@ CHECK-NEXT: Offset: 0x{{[[:xdigit:]]+}}
CHECK-NEXT: -
CHECK: Records:
-CHEC-NEXT FunctionGUID: {{[0-9]+}}
-CHEC-NEXT AllocSites:
-CHEC-NEXT -
-CHEC-NEXT Callstack:
-CHEC-NEXT -
-CHEC-NEXT Function: {{[0-9]+}}
-CHEC-NEXT SymbolName: main
-CHEC-NEXT LineOffset: 3
-CHEC-NEXT Column: 10
-CHEC-NEXT Inline: 0
-CHEC-NEXT MemInfoBlock:
-CHEC-NEXT AllocCount: 1
-CHEC-NEXT TotalAccessCount: 5
-CHEC-NEXT MinAccessCount: 5
-CHEC-NEXT MaxAccessCount: 5
-CHEC-NEXT TotalSize: 24
-CHEC-NEXT MinSize: 24
-CHEC-NEXT MaxSize: 24
-CHEC-NEXT AllocTimestamp: {{[0-9]+}}
-CHEC-NEXT DeallocTimestamp: {{[0-9]+}}
-CHEC-NEXT TotalLifetime: 0
-CHEC-NEXT MinLifetime: 0
-CHEC-NEXT MaxLifetime: 0
-CHEC-NEXT AllocCpuId: 11
-CHEC-NEXT DeallocCpuId: 11
-CHEC-NEXT NumMigratedCpu: 0
-CHEC-NEXT NumLifetimeOverlaps: 0
-CHEC-NEXT NumSameAllocCpu: 0
-CHEC-NEXT NumSameDeallocCpu: 0
-CHEC-NEXT DataTypeId: 0
-CHEC-NEXT TotalAccessDensity: 20
-CHEC-NEXT MinAccessDensity: 20
-CHEC-NEXT MaxAccessDensity: 20
-CHEC-NEXT TotalLifetimeAccessDensity: 20000
-CHEC-NEXT MinLifetimeAccessDensity: 20000
-CHEC-NEXT MaxLifetimeAccessDensity: 20000
-CHEC-NEXT AccessHistogramSize: 3
-CHEC-NEXT AccessHistogram: {{[0-9]+}}
-CHEC-NEXT AccessHistogramValues: -2 -1 -2
-CHEC-NEXT -
-CHEC-NEXT Callstack:
-CHEC-NEXT -
-CHEC-NEXT Function: {{[0-9]+}}
-CHEC-NEXT SymbolName: main
-CHEC-NEXT LineOffset: 10
-CHEC-NEXT Column: 10
-CHEC-NEXT Inline: 0
-CHEC-NEXT MemInfoBlock:
-CHEC-NEXT AllocCount: 1
-CHEC-NEXT TotalAccessCount: 4
-CHEC-NEXT MinAccessCount: 4
-CHEC-NEXT MaxAccessCount: 4
-CHEC-NEXT TotalSize: 48
-CHEC-NEXT MinSize: 48
-CHEC-NEXT MaxSize: 48
-CHEC-NEXT AllocTimestamp: {{[0-9]+}}
-CHEC-NEXT DeallocTimestamp: {{[0-9]+}}
-CHEC-NEXT TotalLifetime: 0
-CHEC-NEXT MinLifetime: 0
-CHEC-NEXT MaxLifetime: 0
-CHEC-NEXT AllocCpuId: 11
-CHEC-NEXT DeallocCpuId: 11
-CHEC-NEXT NumMigratedCpu: 0
-CHEC-NEXT NumLifetimeOverlaps: 0
-CHEC-NEXT NumSameAllocCpu: 0
-CHEC-NEXT NumSameDeallocCpu: 0
-CHEC-NEXT DataTypeId: 0
-CHEC-NEXT TotalAccessDensity: 8
-CHEC-NEXT MinAccessDensity: 8
-CHEC-NEXT MaxAccessDensity: 8
-CHEC-NEXT TotalLifetimeAccessDensity: 8000
-CHEC-NEXT MinLifetimeAccessDensity: 8000
-CHEC-NEXT MaxLifetimeAccessDensity: 8000
-CHEC-NEXT AccessHistogramSize: 6
-CHEC-NEXT AccessHistogram: {{[0-9]+}}
-CHEC-NEXT AccessHistogramValues: -2 -0 -0 -0 -1 -1 \ No newline at end of file
+CHECK-NEXT FunctionGUID: {{[0-9]+}}
+CHECK-NEXT AllocSites:
+CHECK-NEXT -
+CHECK-NEXT Callstack:
+CHECK-NEXT -
+CHECK-NEXT Function: {{[0-9]+}}
+CHECK-NEXT SymbolName: main
+CHECK-NEXT LineOffset: 3
+CHECK-NEXT Column: 10
+CHECK-NEXT Inline: 0
+CHECK-NEXT MemInfoBlock:
+CHECK-NEXT AllocCount: 1
+CHECK-NEXT TotalAccessCount: 5
+CHECK-NEXT MinAccessCount: 5
+CHECK-NEXT MaxAccessCount: 5
+CHECK-NEXT TotalSize: 24
+CHECK-NEXT MinSize: 24
+CHECK-NEXT MaxSize: 24
+CHECK-NEXT AllocTimestamp: {{[0-9]+}}
+CHECK-NEXT DeallocTimestamp: {{[0-9]+}}
+CHECK-NEXT TotalLifetime: 0
+CHECK-NEXT MinLifetime: 0
+CHECK-NEXT MaxLifetime: 0
+CHECK-NEXT AllocCpuId: 11
+CHECK-NEXT DeallocCpuId: 11
+CHECK-NEXT NumMigratedCpu: 0
+CHECK-NEXT NumLifetimeOverlaps: 0
+CHECK-NEXT NumSameAllocCpu: 0
+CHECK-NEXT NumSameDeallocCpu: 0
+CHECK-NEXT DataTypeId: 0
+CHECK-NEXT TotalAccessDensity: 20
+CHECK-NEXT MinAccessDensity: 20
+CHECK-NEXT MaxAccessDensity: 20
+CHECK-NEXT TotalLifetimeAccessDensity: 20000
+CHECK-NEXT MinLifetimeAccessDensity: 20000
+CHECK-NEXT MaxLifetimeAccessDensity: 20000
+CHECK-NEXT AccessHistogramSize: 3
+CHECK-NEXT AccessHistogram: {{[0-9]+}}
+CHECK-NEXT AccessHistogramValues: -2 -1 -2
+CHECK-NEXT -
+CHECK-NEXT Callstack:
+CHECK-NEXT -
+CHECK-NEXT Function: {{[0-9]+}}
+CHECK-NEXT SymbolName: main
+CHECK-NEXT LineOffset: 10
+CHECK-NEXT Column: 10
+CHECK-NEXT Inline: 0
+CHECK-NEXT MemInfoBlock:
+CHECK-NEXT AllocCount: 1
+CHECK-NEXT TotalAccessCount: 4
+CHECK-NEXT MinAccessCount: 4
+CHECK-NEXT MaxAccessCount: 4
+CHECK-NEXT TotalSize: 48
+CHECK-NEXT MinSize: 48
+CHECK-NEXT MaxSize: 48
+CHECK-NEXT AllocTimestamp: {{[0-9]+}}
+CHECK-NEXT DeallocTimestamp: {{[0-9]+}}
+CHECK-NEXT TotalLifetime: 0
+CHECK-NEXT MinLifetime: 0
+CHECK-NEXT MaxLifetime: 0
+CHECK-NEXT AllocCpuId: 11
+CHECK-NEXT DeallocCpuId: 11
+CHECK-NEXT NumMigratedCpu: 0
+CHECK-NEXT NumLifetimeOverlaps: 0
+CHECK-NEXT NumSameAllocCpu: 0
+CHECK-NEXT NumSameDeallocCpu: 0
+CHECK-NEXT DataTypeId: 0
+CHECK-NEXT TotalAccessDensity: 8
+CHECK-NEXT MinAccessDensity: 8
+CHECK-NEXT MaxAccessDensity: 8
+CHECK-NEXT TotalLifetimeAccessDensity: 8000
+CHECK-NEXT MinLifetimeAccessDensity: 8000
+CHECK-NEXT MaxLifetimeAccessDensity: 8000
+CHECK-NEXT AccessHistogramSize: 6
+CHECK-NEXT AccessHistogram: {{[0-9]+}}
+CHECK-NEXT AccessHistogramValues: -2 -0 -0 -0 -1 -1
diff --git a/llvm/test/tools/llvm-profdata/memprof-pic.test b/llvm/test/tools/llvm-profdata/memprof-pic.test
index 78d2c5c..66203ef 100644
--- a/llvm/test/tools/llvm-profdata/memprof-pic.test
+++ b/llvm/test/tools/llvm-profdata/memprof-pic.test
@@ -11,7 +11,7 @@ RUN: llvm-profdata show --memory %p/Inputs/pic.memprofraw --profiled-binary %p/I
CHECK: MemprofProfile:
CHECK-NEXT: Summary:
-CHECK-NEXT: Version: 4
+CHECK-NEXT: Version: 5
CHECK-NEXT: NumSegments: {{[0-9]+}}
CHECK-NEXT: NumMibInfo: 2
CHECK-NEXT: NumAllocFunctions: 1
@@ -100,4 +100,4 @@ CHECK-NEXT: TotalLifetimeAccessDensity: 20000
CHECK-NEXT: MinLifetimeAccessDensity: 20000
CHECK-NEXT: MaxLifetimeAccessDensity: 20000
CHECK-NEXT: AccessHistogramSize: 0
-CHECK-NEXT: AccessHistogram: 0 \ No newline at end of file
+CHECK-NEXT: AccessHistogram: 0
diff --git a/llvm/test/tools/llvm-rc/windres-preproc.test b/llvm/test/tools/llvm-rc/windres-preproc.test
index 423ad02..43ed0a6 100644
--- a/llvm/test/tools/llvm-rc/windres-preproc.test
+++ b/llvm/test/tools/llvm-rc/windres-preproc.test
@@ -4,7 +4,7 @@
; RUN: llvm-windres -### --include-dir %p/incdir1 --include %p/incdir2 "-DFOO1=\\\"foo bar\\\"" -UFOO2 -D FOO3 --preprocessor-arg "-DFOO4=\\\"baz baz\\\"" -DFOO5=\"bar\" %p/Inputs/empty.rc %t.res | FileCheck %s --check-prefix=CHECK1
; RUN: llvm-windres -### --include-dir %p/incdir1 --include %p/incdir2 "-DFOO1=\"foo bar\"" -UFOO2 -D FOO3 --preprocessor-arg "-DFOO4=\"baz baz\"" "-DFOO5=bar" %p/Inputs/empty.rc %t.res --use-temp-file | FileCheck %s --check-prefix=CHECK1
-; CHECK1: {{^}} "clang" "--driver-mode=gcc" "-target" "{{.*}}-{{.*}}{{mingw32|windows-gnu}}" "-E" "-xc" "-DRC_INVOKED" "-I" "{{.*}}incdir1" "-I" "{{.*}}incdir2" "-D" "FOO1=\"foo bar\"" "-U" "FOO2" "-D" "FOO3" "-DFOO4=\"baz baz\"" "-D" "FOO5=bar" "{{.*}}empty.rc" "-o" "{{.*}}preproc-{{.*}}.rc"{{$}}
+; CHECK1: {{^}} "clang" "--driver-mode=gcc" "-target" "{{.*}}-{{.*}}{{mingw32|cygwin|windows-gnu|windows-cygnus}}" "-E" "-xc" "-DRC_INVOKED" "-I" "{{.*}}incdir1" "-I" "{{.*}}incdir2" "-D" "FOO1=\"foo bar\"" "-U" "FOO2" "-D" "FOO3" "-DFOO4=\"baz baz\"" "-D" "FOO5=bar" "{{.*}}empty.rc" "-o" "{{.*}}preproc-{{.*}}.rc"{{$}}
; RUN: llvm-windres -### --preprocessor "i686-w64-mingw32-gcc" --preprocessor-arg -E "-DFOO=\\\"foo bar\\\"" %p/Inputs/empty.rc %t.res | FileCheck %s --check-prefix=CHECK2
; CHECK2: {{^}} "{{.*}}i686-w64-mingw32-gcc" "-E" "-D" "FOO=\"foo bar\"" "{{.*}}empty.rc" "-o" "{{.*}}preproc-{{.*}}.rc"{{$}}
@@ -13,7 +13,7 @@
; RUN: rm -rf %t-bin/testbin
; RUN: mkdir -p %t-bin/testbin
; RUN: ln -s llvm-windres %t-bin/testbin/i686-w64-mingw32-gcc
-; RUN: env PATH=%t-bin/testbin llvm-windres -### --preprocessor i686-w64-mingw32-gcc --preprocessor-arg -E --preprocessor-arg -xc -DRC_INVOKED %p/Inputs/empty.rc %t.res | FileCheck %s --check-prefix=CHECK3
+; RUN: env PATH="%t-bin/testbin:$PATH" llvm-windres -### --preprocessor i686-w64-mingw32-gcc --preprocessor-arg -E --preprocessor-arg -xc -DRC_INVOKED %p/Inputs/empty.rc %t.res | FileCheck %s --check-prefix=CHECK3
; CHECK3: {{^}} "{{.*}}/testbin/i686-w64-mingw32-gcc" "-E" "-xc" "-D" "RC_INVOKED" "{{.*}}empty.rc" "-o" "{{.*}}preproc-{{.*}}.rc"{{$}}
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/has-cet.exe b/llvm/test/tools/llvm-readobj/COFF/Inputs/has-cet.exe
deleted file mode 100644
index c77060d..0000000
--- a/llvm/test/tools/llvm-readobj/COFF/Inputs/has-cet.exe
+++ /dev/null
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/COFF/Inputs/has-exdllcharacteristics.exe b/llvm/test/tools/llvm-readobj/COFF/Inputs/has-exdllcharacteristics.exe
new file mode 100644
index 0000000..9c36817
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/COFF/Inputs/has-exdllcharacteristics.exe
Binary files differ
diff --git a/llvm/test/tools/llvm-readobj/COFF/cetcompat.test b/llvm/test/tools/llvm-readobj/COFF/cetcompat.test
deleted file mode 100644
index a973b5c..0000000
--- a/llvm/test/tools/llvm-readobj/COFF/cetcompat.test
+++ /dev/null
@@ -1,16 +0,0 @@
-# To regenerate has-cet.exe
-# $ echo int main() { return 0; } > has-cet.c
-# $ cl has-cet.c /link /cetcompat
-RUN: llvm-readobj --coff-debug-directory %p/Inputs/has-cet.exe | FileCheck %s
-
-CHECK: DebugEntry {
-CHECK: Characteristics: 0x0
-CHECK: Type: ExtendedDLLCharacteristics (0x14)
-CHECK: ExtendedCharacteristics [ (0x1)
-CHECK: IMAGE_DLL_CHARACTERISTICS_EX_CET_COMPAT (0x1)
-CHECK: ]
-CHECK: RawData (
-CHECK: 0000: 01000000 |....|
-CHECK: )
-CHECK: }
-
diff --git a/llvm/test/tools/llvm-readobj/COFF/exdllcharacteristics.test b/llvm/test/tools/llvm-readobj/COFF/exdllcharacteristics.test
new file mode 100644
index 0000000..ef35aea
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/COFF/exdllcharacteristics.test
@@ -0,0 +1,22 @@
+# To regenerate has-exdllcharacteristics.exe
+# $ echo int main() { return 0; } > has-exdllcharacteristics.c
+# To make minimum possible stub file (to decrease the binary size)
+# $ echo -n '4D5A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' | xxd -r -p > stub
+# $ cl has-exdllcharacteristics.c /link /entry:main /STUB:stub /NOCOFFGRPINFO /EMITTOOLVERSIONINFO:NO /EMITPOGOPHASEINFO /NOVCFEATURE /MANIFEST:NO /cetcompat /cetcompatstrict /cetdynamicapisinproc /cetipvalidationrelaxed /hotpatchcompatible /functionpadmin:6
+RUN: llvm-readobj --coff-debug-directory %p/Inputs/has-exdllcharacteristics.exe | FileCheck %s
+
+CHECK: DebugEntry {
+CHECK: Characteristics: 0x0
+CHECK: Type: ExtendedDLLCharacteristics (0x14)
+CHECK: ExtendedCharacteristics [ (0x8F)
+CHECK-DAG: IMAGE_DLL_CHARACTERISTICS_EX_CET_COMPAT (0x1)
+CHECK-DAG: IMAGE_DLL_CHARACTERISTICS_EX_CET_COMPAT_STRICT_MODE (0x2)
+CHECK-DAG: IMAGE_DLL_CHARACTERISTICS_EX_CET_SET_CONTEXT_IP_VALIDATION_RELAXED_MODE (0x4)
+CHECK-DAG: IMAGE_DLL_CHARACTERISTICS_EX_CET_DYNAMIC_APIS_ALLOW_IN_PROC_ONLY (0x8)
+CHECK-DAG: IMAGE_DLL_CHARACTERISTICS_EX_HOTPATCH_COMPATIBLE (0x80)
+CHECK: ]
+CHECK: RawData (
+CHECK: 0000: 8F000000 |....|
+CHECK: )
+CHECK: }
+
diff --git a/llvm/test/tools/llvm-readobj/ELF/sframe-fde.test b/llvm/test/tools/llvm-readobj/ELF/sframe-fde.test
new file mode 100644
index 0000000..dee4018
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/ELF/sframe-fde.test
@@ -0,0 +1,237 @@
+## Check parsing and dumping of SFrame Function Descriptor Entries.
+# RUN: yaml2obj --docnum=1 %s -o %t.1
+# RUN: llvm-readobj --sframe=.sframe_short --sframe=.sframe_section_relative \
+# RUN: --sframe=.sframe_fde_relative %t.1 2>&1 | \
+# RUN: FileCheck %s --strict-whitespace --match-full-lines \
+# RUN: -DFILE=%t.1 --check-prefix=CASE1
+
+## Check big-endian support.
+# RUN: yaml2obj --docnum=2 %s -o %t.2
+# RUN: llvm-readobj --sframe %t.2 2>&1 | \
+# RUN: FileCheck %s --strict-whitespace --match-full-lines \
+# RUN: -DFILE=%t.2 --check-prefix=CASE2
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+Sections:
+ - Name: .sframe_short
+ Type: SHT_GNU_SFRAME
+ Flags: [ SHF_ALLOC ]
+ ContentArray: [
+ 0xe2, 0xde, 0x02, 0x00, # Preamble (magic, version, flags)
+ # Header:
+ 0x03, 0x42, 0x47, 0x04, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
+ 0x01, 0x00, 0x00, 0x00, # Number of FDEs
+ 0x10, 0x00, 0x00, 0x00, # Number of FREs
+ 0x00, 0x10, 0x00, 0x00, # FRE length
+ 0x00, 0x00, 0x00, 0x00, # FDE offset
+ 0x00, 0x01, 0x00, 0x00, # FRE offset
+ 0xde, 0xad, 0xbe, 0xef, # AUX header
+ 0x01, 0x02, 0x03, 0x04, # Short FDE
+ ]
+# CASE1-LABEL:SFrame section '.sframe_short' {
+# CASE1: Header {
+# CASE1-NEXT: Magic: 0xDEE2
+# CASE1-NEXT: Version: V2 (0x2)
+# CASE1-NEXT: Flags [ (0x0)
+# CASE1-NEXT: ]
+# CASE1-NEXT: ABI: AMD64EndianLittle (0x3)
+# CASE1-NEXT: CFA fixed FP offset (unused): 66
+# CASE1-NEXT: CFA fixed RA offset: 71
+# CASE1-NEXT: Auxiliary header length: 4
+# CASE1-NEXT: Num FDEs: 1
+# CASE1-NEXT: Num FREs: 16
+# CASE1-NEXT: FRE subsection length: 4096
+# CASE1-NEXT: FDE subsection offset: 0
+# CASE1-NEXT: FRE subsection offset: 256
+# CASE1-NEXT: Auxiliary header: [0xDE, 0xAD, 0xBE, 0xEF]
+# CASE1-NEXT: }
+# CASE1-NEXT:{{.*}}: warning: '[[FILE]]': unexpected end of data at offset 0x24 while reading [0x20, 0x34)
+# CASE1-NEXT:}
+
+ - Name: .sframe_section_relative
+ Type: SHT_GNU_SFRAME
+ Flags: [ SHF_ALLOC ]
+ ContentArray: [
+ 0xe2, 0xde, 0x02, 0x00, # Preamble (magic, version, flags)
+ # Header:
+ 0x03, 0x42, 0x47, 0x00, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
+ 0x01, 0x00, 0x00, 0x00, # Number of FDEs
+ 0x10, 0x00, 0x00, 0x00, # Number of FREs
+ 0x00, 0x10, 0x00, 0x00, # FRE length
+ 0x04, 0x00, 0x00, 0x00, # FDE offset
+ 0x00, 0x01, 0x00, 0x00, # FRE offset
+
+ 0xff, 0xff, 0xff, 0xff, # Unused data skipped due to the FDE offset field
+
+ # FDE:
+ 0x00, 0xde, 0xad, 0x00, # Start Address
+ 0xbe, 0x01, 0x00, 0x00, # Size
+ 0x10, 0x00, 0x00, 0x00, # Start FRE Offset
+ 0x00, 0x00, 0x00, 0x00, # Number of FREs
+ 0x31, 0xde, 0xad, 0x00, # Info, RepSize, Padding2
+ ]
+## Also testing:
+## - dead space between the header and the FDE subsection.
+## - PCMask FDE types
+## - unused PAuth key handling
+# CASE1-LABEL:SFrame section '.sframe_section_relative' {
+# CASE1: Header {
+# CASE1-NEXT: Magic: 0xDEE2
+# CASE1-NEXT: Version: V2 (0x2)
+# CASE1-NEXT: Flags [ (0x0)
+# CASE1-NEXT: ]
+# CASE1-NEXT: ABI: AMD64EndianLittle (0x3)
+# CASE1-NEXT: CFA fixed FP offset (unused): 66
+# CASE1-NEXT: CFA fixed RA offset: 71
+# CASE1-NEXT: Auxiliary header length: 0
+# CASE1-NEXT: Num FDEs: 1
+# CASE1-NEXT: Num FREs: 16
+# CASE1-NEXT: FRE subsection length: 4096
+# CASE1-NEXT: FDE subsection offset: 4
+# CASE1-NEXT: FRE subsection offset: 256
+# CASE1-NEXT: Auxiliary header: []
+# CASE1-NEXT: }
+# CASE1-NEXT: Function Index [
+# CASE1-NEXT: FuncDescEntry [0] {
+# CASE1-NEXT: PC: 0xADDE24
+# CASE1-NEXT: Size: 0x1BE
+# CASE1-NEXT: Start FRE Offset: 0x10
+# CASE1-NEXT: Num FREs: 0
+# CASE1-NEXT: Info {
+# CASE1-NEXT: FRE Type: Addr2 (0x1)
+# CASE1-NEXT: FDE Type: PCMask (0x1)
+# CASE1-NEXT: Raw: 0x31
+# CASE1-NEXT: }
+# CASE1-NEXT: Repetitive block size: 0xDE
+# CASE1-NEXT: Padding2: 0xAD
+# CASE1-NEXT: }
+# CASE1-NEXT: ]
+# CASE1-NEXT:}
+
+ - Name: .sframe_fde_relative
+ Type: SHT_GNU_SFRAME
+ Flags: [ SHF_ALLOC ]
+ ContentArray: [
+ 0xe2, 0xde, 0x02, 0x04, # Preamble (magic, version, flags)
+ # Header:
+ 0x02, 0x42, 0x47, 0x00, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
+ 0x01, 0x00, 0x00, 0x00, # Number of FDEs
+ 0x10, 0x00, 0x00, 0x00, # Number of FREs
+ 0x00, 0x10, 0x00, 0x00, # FRE length
+ 0x04, 0x00, 0x00, 0x00, # FDE offset
+ 0x00, 0x01, 0x00, 0x00, # FRE offset
+
+ 0xff, 0xff, 0xff, 0xff, # Unused data skipped due to the FDE offset field
+
+ # FDE:
+ 0x00, 0xde, 0xad, 0x00, # Start Address
+ 0xbe, 0x01, 0x00, 0x00, # Size
+ 0x10, 0x00, 0x00, 0x00, # Start FRE Offset
+ 0x00, 0x00, 0x00, 0x00, # Number of FREs
+ 0x02, 0xde, 0xad, 0x00, # Info, RepSize, Padding2
+ ]
+## Also testing:
+## - PCInc FDE type
+## - AArch64 PAuth key handling
+# CASE1-LABEL:SFrame section '.sframe_fde_relative' {
+# CASE1: Header {
+# CASE1-NEXT: Magic: 0xDEE2
+# CASE1-NEXT: Version: V2 (0x2)
+# CASE1-NEXT: Flags [ (0x4)
+# CASE1-NEXT: FDEFuncStartPCRel (0x4){{ *}}
+# CASE1-NEXT: ]
+# CASE1-NEXT: ABI: AArch64EndianLittle (0x2)
+# CASE1-NEXT: CFA fixed FP offset (unused): 66
+# CASE1-NEXT: CFA fixed RA offset (unused): 71
+# CASE1-NEXT: Auxiliary header length: 0
+# CASE1-NEXT: Num FDEs: 1
+# CASE1-NEXT: Num FREs: 16
+# CASE1-NEXT: FRE subsection length: 4096
+# CASE1-NEXT: FDE subsection offset: 4
+# CASE1-NEXT: FRE subsection offset: 256
+# CASE1-NEXT: Auxiliary header: []
+# CASE1-NEXT: }
+# CASE1-NEXT: Function Index [
+# CASE1-NEXT: FuncDescEntry [0] {
+# CASE1-NEXT: PC: 0xADDE78
+# CASE1-NEXT: Size: 0x1BE
+# CASE1-NEXT: Start FRE Offset: 0x10
+# CASE1-NEXT: Num FREs: 0
+# CASE1-NEXT: Info {
+# CASE1-NEXT: FRE Type: Addr4 (0x2)
+# CASE1-NEXT: FDE Type: PCInc (0x0)
+# CASE1-NEXT: PAuth Key: A (0x0)
+# CASE1-NEXT: Raw: 0x2
+# CASE1-NEXT: }
+# CASE1-NEXT: Repetitive block size (unused): 0xDE
+# CASE1-NEXT: Padding2: 0xAD
+# CASE1-NEXT: }
+# CASE1-NEXT: ]
+# CASE1-NEXT:}
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2MSB
+ Type: ET_EXEC
+Sections:
+ - Name: .sframe
+ Type: SHT_GNU_SFRAME
+ Flags: [ SHF_ALLOC ]
+ ContentArray: [
+ 0xde, 0xe2, 0x02, 0x05, # Preamble (magic, version, flags)
+ # Header:
+ 0x01, 0x42, 0x47, 0x00, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
+ 0x00, 0x00, 0x00, 0x01, # Number of FDEs
+ 0x00, 0x00, 0x00, 0x10, # Number of FREs
+ 0x00, 0x00, 0x10, 0x00, # FRE length
+ 0x00, 0x00, 0x00, 0x00, # FDE offset
+ 0x00, 0x00, 0x01, 0x00, # FRE offset
+
+ # FDE:
+ 0x00, 0xde, 0xad, 0x00, # Start Address
+ 0x00, 0x00, 0x01, 0xbe, # Size
+ 0x00, 0x00, 0x00, 0x10, # Start FRE Offset
+ 0x00, 0x00, 0x00, 0x10, # Number of FREs
+ 0x02, 0xde, 0xad, 0x00, # Info, RepSize, Padding2
+ ]
+# CASE2-LABEL:SFrame section '.sframe' {
+# CASE2: Header {
+# CASE2-NEXT: Magic: 0xDEE2
+# CASE2-NEXT: Version: V2 (0x2)
+# CASE2-NEXT: Flags [ (0x5)
+# CASE2-NEXT: FDEFuncStartPCRel (0x4){{ *}}
+# CASE2-NEXT: FDESorted (0x1){{ *}}
+# CASE2-NEXT: ]
+# CASE2-NEXT: ABI: AArch64EndianBig (0x1)
+# CASE2-NEXT: CFA fixed FP offset (unused): 66
+# CASE2-NEXT: CFA fixed RA offset (unused): 71
+# CASE2-NEXT: Auxiliary header length: 0
+# CASE2-NEXT: Num FDEs: 1
+# CASE2-NEXT: Num FREs: 16
+# CASE2-NEXT: FRE subsection length: 4096
+# CASE2-NEXT: FDE subsection offset: 0
+# CASE2-NEXT: FRE subsection offset: 256
+# CASE2-NEXT: Auxiliary header: []
+# CASE2-NEXT: }
+# CASE2-NEXT: Function Index [
+# CASE2-NEXT: FuncDescEntry [0] {
+# CASE2-NEXT: PC: 0xDEAD1C
+# CASE2-NEXT: Size: 0x1BE
+# CASE2-NEXT: Start FRE Offset: 0x10
+# CASE2-NEXT: Num FREs: 16
+# CASE2-NEXT: Info {
+# CASE2-NEXT: FRE Type: Addr4 (0x2)
+# CASE2-NEXT: FDE Type: PCInc (0x0)
+# CASE2-NEXT: PAuth Key: A (0x0)
+# CASE2-NEXT: Raw: 0x2
+# CASE2-NEXT: }
+# CASE2-NEXT: Repetitive block size (unused): 0xDE
+# CASE2-NEXT: Padding2: 0xAD00
+# CASE2-NEXT: }
+# CASE2-NEXT: ]
+# CASE2-NEXT:}
diff --git a/llvm/test/tools/llvm-readobj/ELF/sframe-header.test b/llvm/test/tools/llvm-readobj/ELF/sframe-header.test
index f827296..e7c0db0 100644
--- a/llvm/test/tools/llvm-readobj/ELF/sframe-header.test
+++ b/llvm/test/tools/llvm-readobj/ELF/sframe-header.test
@@ -2,7 +2,8 @@
# RUN: yaml2obj --docnum=1 %s -o %t.1
# RUN: llvm-readobj --sframe=.sframe_bad_sh_size --sframe=.sframe_1b \
# RUN: --sframe=.sframe_bad_magic --sframe=.sframe_bad_version \
-# RUN: --sframe=.sframe_6b --sframe=.sframe_header %t.1 2>&1 | \
+# RUN: --sframe=.sframe_6b --sframe=.sframe_short_auxheader \
+# RUN: --sframe=.sframe_header %t.1 2>&1 | \
# RUN: FileCheck %s --strict-whitespace --match-full-lines \
# RUN: -DFILE=%t.1 --check-prefix=CASE1
@@ -60,24 +61,24 @@ Sections:
0xe2, 0xde, 0x02, 0x00, # Preamble (magic, version, flags)
0x01, 0x02
]
-
# CASE1-LABEL:SFrame section '.sframe_6b' {
# CASE1:{{.*}}: warning: '[[FILE]]': invalid sframe section: unexpected end of data at offset 0x6 while reading [0x0, 0x1c)
- - Name: .sframe_header
+ - Name: .sframe_short_auxheader
Type: SHT_GNU_SFRAME
Flags: [ SHF_ALLOC ]
ContentArray: [
0xe2, 0xde, 0x02, 0x06, # Preamble (magic, version, flags)
# Header:
- 0x03, 0x42, 0x47, 0x00, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
+ 0x03, 0x42, 0x47, 0x08, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
0x01, 0x00, 0x00, 0x00, # Number of FDEs
0x10, 0x00, 0x00, 0x00, # Number of FREs
0x00, 0x10, 0x00, 0x00, # FRE length
- 0x04, 0x00, 0x00, 0x00, # FDE offset
+ 0x00, 0x00, 0x00, 0x00, # FDE offset
0x00, 0x01, 0x00, 0x00, # FRE offset
+ 0xde, 0xad, 0xbe, 0xef, # AUX header
]
-# CASE1-LABEL:SFrame section '.sframe_header' {
+# CASE1-LABEL:SFrame section '.sframe_short_auxheader' {
# CASE1: Header {
# CASE1-NEXT: Magic: 0xDEE2
# CASE1-NEXT: Version: V2 (0x2)
@@ -88,13 +89,52 @@ Sections:
# CASE1-NEXT: ABI: AMD64EndianLittle (0x3)
# CASE1-NEXT: CFA fixed FP offset (unused): 66
# CASE1-NEXT: CFA fixed RA offset: 71
-# CASE1-NEXT: Auxiliary header length: 0
+# CASE1-NEXT: Auxiliary header length: 8
# CASE1-NEXT: Num FDEs: 1
# CASE1-NEXT: Num FREs: 16
# CASE1-NEXT: FRE subsection length: 4096
-# CASE1-NEXT: FDE subsection offset: 4
+# CASE1-NEXT: FDE subsection offset: 0
+# CASE1-NEXT: FRE subsection offset: 256
+# CASE1-NEXT:{{.*}}: warning: '[[FILE]]': unexpected end of data at offset 0x20 while reading [0x1c, 0x24)
+# CASE1-NEXT: }
+# CASE1-NEXT:{{.*}}: warning: '[[FILE]]': unexpected end of data at offset 0x20 while reading [0x24, 0x38)
+# CASE1-NEXT:}
+
+ - Name: .sframe_header
+ Type: SHT_GNU_SFRAME
+ Flags: [ SHF_ALLOC ]
+ ContentArray: [
+ 0xe2, 0xde, 0x02, 0x06, # Preamble (magic, version, flags)
+ # Header:
+ 0x03, 0x42, 0x47, 0x04, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
+ 0x00, 0x00, 0x00, 0x00, # Number of FDEs
+ 0x10, 0x00, 0x00, 0x00, # Number of FREs
+ 0x00, 0x10, 0x00, 0x00, # FRE length
+ 0x00, 0x00, 0x00, 0x00, # FDE offset
+ 0x00, 0x01, 0x00, 0x00, # FRE offset
+ 0xde, 0xad, 0xbe, 0xef, # AUX header
+ ]
+# CASE1-LABEL:SFrame section '.sframe_header' {
+# CASE1: Header {
+# CASE1-NEXT: Magic: 0xDEE2
+# CASE1-NEXT: Version: V2 (0x2)
+# CASE1-NEXT: Flags [ (0x6)
+# CASE1-NEXT: FDEFuncStartPCRel (0x4){{ *}}
+# CASE1-NEXT: FramePointer (0x2){{ *}}
+# CASE1-NEXT: ]
+# CASE1-NEXT: ABI: AMD64EndianLittle (0x3)
+# CASE1-NEXT: CFA fixed FP offset (unused): 66
+# CASE1-NEXT: CFA fixed RA offset: 71
+# CASE1-NEXT: Auxiliary header length: 4
+# CASE1-NEXT: Num FDEs: 0
+# CASE1-NEXT: Num FREs: 16
+# CASE1-NEXT: FRE subsection length: 4096
+# CASE1-NEXT: FDE subsection offset: 0
# CASE1-NEXT: FRE subsection offset: 256
+# CASE1-NEXT: Auxiliary header: [0xDE, 0xAD, 0xBE, 0xEF]
# CASE1-NEXT: }
+# CASE1-NEXT: Function Index [
+# CASE1-NEXT: ]
# CASE1-NEXT:}
--- !ELF
@@ -110,10 +150,10 @@ Sections:
0xde, 0xe2, 0x02, 0x01, # Preamble (magic, version, flags)
# Header:
0x01, 0x42, 0x47, 0x00, # ABI, Fixed FP offset, Fixed RA Offset, AUX header length
- 0x00, 0x00, 0x00, 0x01, # Number of FDEs
+ 0x00, 0x00, 0x00, 0x00, # Number of FDEs
0x00, 0x00, 0x00, 0x10, # Number of FREs
0x00, 0x00, 0x10, 0x00, # FRE length
- 0x00, 0x00, 0x00, 0x04, # FDE offset
+ 0x00, 0x00, 0x00, 0x00, # FDE offset
0x00, 0x00, 0x01, 0x00, # FRE offset
]
# CASE2-LABEL:SFrame section '.sframe' {
@@ -127,12 +167,15 @@ Sections:
# CASE2-NEXT: CFA fixed FP offset (unused): 66
# CASE2-NEXT: CFA fixed RA offset (unused): 71
# CASE2-NEXT: Auxiliary header length: 0
-# CASE2-NEXT: Num FDEs: 1
+# CASE2-NEXT: Num FDEs: 0
# CASE2-NEXT: Num FREs: 16
# CASE2-NEXT: FRE subsection length: 4096
-# CASE2-NEXT: FDE subsection offset: 4
+# CASE2-NEXT: FDE subsection offset: 0
# CASE2-NEXT: FRE subsection offset: 256
+# CASE2-NEXT: Auxiliary header: []
# CASE2-NEXT: }
+# CASE2-NEXT: Function Index [
+# CASE2-NEXT: ]
# CASE2-NEXT:}
--- !ELF
diff --git a/llvm/test/tools/llvm-reduce/operands-to-args-lifetimes.ll b/llvm/test/tools/llvm-reduce/operands-to-args-lifetimes.ll
new file mode 100644
index 0000000..d9ed9df
--- /dev/null
+++ b/llvm/test/tools/llvm-reduce/operands-to-args-lifetimes.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-reduce %s -o %t --abort-on-invalid-reduction --delta-passes=operands-to-args --test FileCheck --test-arg %s --test-arg --check-prefix=INTERESTING --test-arg --input-file
+; RUN: FileCheck %s --input-file %t --check-prefix=REDUCED
+
+; INTERESTING: store
+; REDUCED: define void @test(ptr %a) {
+; REDUCED-NEXT: %a1 = alloca i32
+; REDUCED-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr %a1)
+; REDUCED-NEXT: store i32 0, ptr %a
+; REDUCED-NEXT: store i32 1, ptr %a
+; REDUCED-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr %a1)
+define void @test() {
+ %a = alloca i32
+ call void @llvm.lifetime.start.p0(i64 4, ptr %a)
+ store i32 0, ptr %a
+ store i32 1, ptr %a
+ call void @llvm.lifetime.end.p0(i64 4, ptr %a)
+ ret void
+}
diff --git a/llvm/test/tools/obj2yaml/ELF/eflags.yaml b/llvm/test/tools/obj2yaml/ELF/eflags.yaml
new file mode 100644
index 0000000..da16a62
--- /dev/null
+++ b/llvm/test/tools/obj2yaml/ELF/eflags.yaml
@@ -0,0 +1,31 @@
+## Check how obj2yaml dumps e_flags field.
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2MSB
+ Type: ET_EXEC
+ Machine: EM_SPARC32PLUS
+ Flags: [ [[FLAGS]] ]
+
+# RUN: yaml2obj -DFLAGS="EF_SPARC_32PLUS " %s -o %t2
+# RUN: obj2yaml %t2 | FileCheck %s --check-prefix=FLAG
+
+# FLAG: --- !ELF
+# FLAG-NEXT: FileHeader:
+# FLAG-NEXT: Class: ELFCLASS64
+# FLAG-NEXT: Data: ELFDATA2MSB
+# FLAG-NEXT: Type: ET_EXEC
+# FLAG-NEXT: Machine: EM_SPARC32PLUS
+# FLAG-NEXT: Flags: [ EF_SPARC_32PLUS ]
+
+# RUN: yaml2obj -DFLAGS="EF_SPARC_HAL_R1 " %s -o %t3
+# RUN: obj2yaml %t3 | FileCheck %s --check-prefix=FLAG2
+
+# FLAG2: --- !ELF
+# FLAG2-NEXT: FileHeader:
+# FLAG2-NEXT: Class: ELFCLASS64
+# FLAG2-NEXT: Data: ELFDATA2MSB
+# FLAG2-NEXT: Type: ET_EXEC
+# FLAG2-NEXT: Machine: EM_SPARC32PLUS
+# FLAG2-NEXT: Flags: [ EF_SPARC_HAL_R1 ]
diff --git a/llvm/test/tools/yaml2obj/file-header-flags.yaml b/llvm/test/tools/yaml2obj/file-header-flags.yaml
new file mode 100644
index 0000000..baa101a
--- /dev/null
+++ b/llvm/test/tools/yaml2obj/file-header-flags.yaml
@@ -0,0 +1,25 @@
+## Test for FileHeader Flags.
+
+## When FLAGS variable isn't defined, the e_flags value is 0.
+## Otherwise, it's the specified value.
+
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=NO-FLAG
+
+# RUN: yaml2obj %s -o %t -DFLAGS=[EF_SPARC_32PLUS]
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=FLAG
+
+!ELF
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_SPARC32PLUS
+ Flags: [[FLAGS=<none>]]
+
+# NO-FLAG: Flags [ (0x0)
+# NO-FLAG-NEXT: ]
+
+# FLAG: Flags [ (0x100)
+# FLAG-NEXT: EF_SPARC_32PLUS (0x100)
+# FLAG-NEXT: ]