llvm/test/LTO/Resolution/X86/linker-redef.ll
Dmitry Mikulin 75fb58cb54 Symbols re-defined with -wrap and -defsym need to be excluded from inter-
procedural optimizations to prevent dropping symbols and allow the linker
to process re-directs.

PR33145: --wrap doesn't work with lto.
Differential Revision: https://reviews.llvm.org/D33621

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304719 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 16:24:25 +00:00

17 lines
379 B
LLVM

; RUN: llvm-as %s -o %t.o
; RUN: llvm-lto2 run -o %t1.o %t.o -r %t.o,bar,pr
; RUN: llvm-readobj -t %t1.o.0 | FileCheck %s
; CHECK: Name: bar
; CHECK-NEXT: Value:
; CHECK-NEXT: Size:
; CHECK-NEXT: Binding: Weak
; CHECK-NEXT: Type: Function
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @bar() {
ret void
}