mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
3c56dcb7eb
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
19 lines
349 B
LLVM
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
|
|
}
|