From 19454f1a9d6acef43e37a769a45ff6d55f70b826 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 14 Mar 2018 20:41:39 +0000 Subject: [PATCH] [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 --- lld/test/COFF/dll.test | 2 +- lld/test/COFF/lto-comdat.ll | 11 +++++------ lld/test/COFF/lto-parallel.ll | 4 +++- lld/test/COFF/weak-external.test | 1 + lld/test/COFF/weak-external3.test | 1 + 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lld/test/COFF/dll.test b/lld/test/COFF/dll.test index abd39f4eeb24..9bd86980319f 100644 --- a/lld/test/COFF/dll.test +++ b/lld/test/COFF/dll.test @@ -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: diff --git a/lld/test/COFF/lto-comdat.ll b/lld/test/COFF/lto-comdat.ll index b255f69d1ab5..9594d30f7051 100644 --- a/lld/test/COFF/lto-comdat.ll +++ b/lld/test/COFF/lto-comdat.ll @@ -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 diff --git a/lld/test/COFF/lto-parallel.ll b/lld/test/COFF/lto-parallel.ll index 449e3a01a853..df0dc25cdfcf 100644 --- a/lld/test/COFF/lto-parallel.ll +++ b/lld/test/COFF/lto-parallel.ll @@ -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() { diff --git a/lld/test/COFF/weak-external.test b/lld/test/COFF/weak-external.test index 7bdadd9b1c94..141d5ed68e10 100644 --- a/lld/test/COFF/weak-external.test +++ b/lld/test/COFF/weak-external.test @@ -5,6 +5,7 @@ # RUN: FileCheck %s < %t2.map # CHECK: lto.tmp +# CHECK-NEXT: lto.tmp # CHECK-NEXT: 0 g --- !COFF diff --git a/lld/test/COFF/weak-external3.test b/lld/test/COFF/weak-external3.test index a06ce48a61a6..8d2bde2a40eb 100644 --- a/lld/test/COFF/weak-external3.test +++ b/lld/test/COFF/weak-external3.test @@ -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