1; REQUIRES: x86 2; Test that ICF works after LTO, i.e. both functions have the same address. 3; Previously, when we didn't enable function sections, ICF didn't work. 4 5; RUN: llvm-as %s -o %t.bc 6; RUN: lld-link -opt:icf -dll -noentry %t.bc -out:%t.dll 7; RUN: llvm-readobj --coff-exports %t.dll | FileCheck %s 8 9; CHECK: Export { 10; CHECK: RVA: 0x[[RVA:.*]] 11; CHECK: Export { 12; CHECK: RVA: 0x[[RVA]] 13; CHECK-NOT: Export 14 15target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 16target triple = "x86_64-pc-windows-msvc19.12.25835" 17 18define dllexport ptr @icf_ptr() { 19entry: 20 ret ptr null 21} 22 23define dllexport i64 @icf_int() { 24entry: 25 ret i64 0 26} 27