[COFF] Fix LLD COFF tests as a follow-up to r327563

I definitely didn't run the tests before committing :(

Most of these tests failed because the LLD map file output changed,
moving the functions from the main text section to a new per-function
section.

ICF also started to fire in a few cases, leading to new layouts.

llvm-svn: 327571
This commit is contained in:
Reid Kleckner 2018-03-14 20:41:39 +00:00
parent 25fb15a08f
commit 19454f1a9d
5 changed files with 11 additions and 8 deletions

View File

@ -26,7 +26,7 @@ EXPORT2-NEXT: 1 0x1010 exportfn3
EXPORT2-NEXT: 2 0x101c mangled2
# RUN: llvm-as -o %t.lto.obj %p/Inputs/export.ll
# RUN: lld-link /out:%t.lto.dll /dll %t.lto.obj /export:exportfn1 /export:exportfn2
# RUN: lld-link -opt:noicf /out:%t.lto.dll /dll %t.lto.obj /export:exportfn1 /export:exportfn2
# RUN: llvm-objdump -p %t.lto.dll | FileCheck -check-prefix=EXPORT-LTO %s
EXPORT-LTO: Export Table:

View File

@ -49,18 +49,17 @@
; TEXT-01: Disassembly of section .text:
; TEXT-01-NEXT: .text:
; TEXT-01-NEXT: subq $40, %rsp
; TEXT-01-NEXT: callq 39
; TEXT-01-NEXT: callq 50
; TEXT-01-NEXT: callq 23
; TEXT-01-NEXT: callq 18
; TEXT-01-NEXT: callq 13
; TEXT-01-NEXT: xorl %eax, %eax
; TEXT-01-NEXT: addq $40, %rsp
; TEXT-01: retq
; TEXT-01-NOT: callq
; TEXT-01: retq
; TEXT-01-NOT: callq
; TEXT-01: retq
; TEXT-01-NOT: callq
; TEXT-01: retq
; TEXT-01: int3
; TEXT-01: int3
; TEXT-01: int3
; TEXT-01-NOT: {{.}}
; HEADERS-10: AddressOfEntryPoint: 0x2020

View File

@ -1,10 +1,11 @@
; RUN: llvm-as -o %t.obj %s
; RUN: lld-link /out:%t.exe /entry:foo /include:bar /opt:lldltopartitions=2 /subsystem:console /lldmap:%t.map %t.obj
; RUN: lld-link -opt:noicf /out:%t.exe /entry:foo /include:bar /opt:lldltopartitions=2 /subsystem:console /lldmap:%t.map %t.obj
; RUN: FileCheck %s < %t.map
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
; CHECK: lto.tmp
; CHECK: lto.tmp
; CHECK-NEXT: foo
define void @foo() {
@ -12,6 +13,7 @@ define void @foo() {
ret void
}
; CHECK: lto.tmp
; CHECK: lto.tmp
; CHECK: bar
define void @bar() {

View File

@ -5,6 +5,7 @@
# RUN: FileCheck %s < %t2.map
# CHECK: lto.tmp
# CHECK-NEXT: lto.tmp
# CHECK-NEXT: 0 g
--- !COFF

View File

@ -5,6 +5,7 @@
# RUN: lld-link /out:%t2.exe /entry:f /subsystem:console /lldmap:%t2.map %t.obj %t.lto.obj
# RUN: FileCheck --check-prefix=CHECK2 %s < %t2.map
# CHECK1: lto.tmp
# CHECK1: lto.tmp
# CHECK1-NEXT: 0 g