1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Assembler/ifunc-dsolocal.ll
Rafael Espindola 2ce48efc54 Allow dso_local on ifunc.
It was never fully disallowed. We were rejecting it in the asm parser,
but not in the verifier.

Currently TargetMachine::shouldAssumeDSOLocal returns true for hidden
ifuncs. I considered changing it and moving the check from the asm
parser to the verifier.

The reason for deciding to allow it instead is that all linkers handle
a direct reference just fine. They use the plt address as the address
of the function. In fact doing that means that clang doesn't have the
same bug as gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83782.

This patch then removes the check from the asm parser and updates the
bitcode reader and writer.

llvm-svn: 322378
2018-01-12 17:03:43 +00:00

10 lines
219 B
LLVM

; RUN: llvm-as < %s | llvm-dis | FileCheck %s
@foo = dso_local ifunc i32 (i32), i64 ()* @foo_ifunc
; CHECK: @foo = dso_local ifunc i32 (i32), i64 ()* @foo_ifunc
define internal i64 @foo_ifunc() {
entry:
ret i64 0
}