| OLD | NEW |
| 1 ; Tests filetype=obj with -ffunction-sections. | 1 ; Tests filetype=obj with -ffunction-sections. |
| 2 | 2 |
| 3 ; RUN: %p2i -i %s --filetype=obj --args -O2 --verbose none -o %t \ | 3 ; RUN: %p2i -i %s --filetype=obj --args -O2 -o %t -ffunction-sections && \ |
| 4 ; RUN: -ffunction-sections && \ | |
| 5 ; RUN: llvm-readobj -file-headers -sections -section-data \ | 4 ; RUN: llvm-readobj -file-headers -sections -section-data \ |
| 6 ; RUN: -relocations -symbols %t | FileCheck %s | 5 ; RUN: -relocations -symbols %t | FileCheck %s |
| 7 | 6 |
| 8 ; RUN: %p2i -i %s --args -O2 --verbose none -ffunction-sections \ | 7 ; RUN: %if --need=allow_dump --command \ |
| 9 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj -o - \ | 8 ; RUN: %p2i -i %s --args -O2 -ffunction-sections \ |
| 10 ; RUN: | llvm-readobj -file-headers -sections -section-data \ | 9 ; RUN: | %if --need=allow_dump --command \ |
| 11 ; RUN: -relocations -symbols - | FileCheck %s | 10 ; RUN: llvm-mc -triple=i686-none-nacl -filetype=obj -o - \ |
| 11 ; RUN: | %if --need=allow_dump --command \ |
| 12 ; RUN: llvm-readobj -file-headers -sections -section-data \ |
| 13 ; RUN: -relocations -symbols - \ |
| 14 ; RUN: | %if --need=allow_dump --command FileCheck %s |
| 12 | 15 |
| 13 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) | 16 declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) |
| 14 | 17 |
| 15 define internal i32 @foo(i32 %x, i32 %len) { | 18 define internal i32 @foo(i32 %x, i32 %len) { |
| 16 %y = add i32 %x, %x | 19 %y = add i32 %x, %x |
| 17 %dst = inttoptr i32 %y to i8* | 20 %dst = inttoptr i32 %y to i8* |
| 18 %src = inttoptr i32 %x to i8* | 21 %src = inttoptr i32 %x to i8* |
| 19 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %src, | 22 call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %src, |
| 20 i32 %len, i32 1, i1 false) | 23 i32 %len, i32 1, i1 false) |
| 21 | 24 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 ; CHECK: 0x25 R_386_PC32 {{.*}}foo 0x0 | 86 ; CHECK: 0x25 R_386_PC32 {{.*}}foo 0x0 |
| 84 ; CHECK: } | 87 ; CHECK: } |
| 85 ; CHECK: ] | 88 ; CHECK: ] |
| 86 | 89 |
| 87 ; CHECK: Symbols [ | 90 ; CHECK: Symbols [ |
| 88 ; CHECK: Name: bar | 91 ; CHECK: Name: bar |
| 89 ; CHECK: Name: foo | 92 ; CHECK: Name: foo |
| 90 ; CHECK: Name: _start | 93 ; CHECK: Name: _start |
| 91 ; CHECK: Name: memcpy | 94 ; CHECK: Name: memcpy |
| 92 ; CHECK: ] | 95 ; CHECK: ] |
| OLD | NEW |