1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Transforms/Inline/pr21206.ll
David Majnemer 3c56dcb7eb Inliner: Non-local functions in COMDATs shouldn't be dropped
A function with discardable linkage cannot be discarded if its a member
of a COMDAT group without considering all the other COMDAT members as
well.  This sort of thing is already handled by GlobalOpt/GlobalDCE.

This fixes PR21206.

llvm-svn: 219335
2014-10-08 19:32:32 +00:00

19 lines
349 B
LLVM

; RUN: opt < %s -inline -S | FileCheck %s
$c = comdat any
; CHECK: $c = comdat any
define linkonce_odr void @foo() comdat $c {
ret void
}
; CHECK: define linkonce_odr void @foo() comdat $c
define linkonce_odr void @bar() comdat $c {
ret void
}
; CHECK: define linkonce_odr void @bar() comdat $c
define void()* @zed() {
ret void()* @foo
}