[LTO] Handle GlobalIFunc in LTOModule::parseSymbols (#212515)
Avoids the assert immediately below. Fixes #45694 rdar://182744700
This commit is contained in:
parent
2faa90a208
commit
a463071dc4
2 changed files with 19 additions and 1 deletions
|
|
@ -611,7 +611,7 @@ void LTOModule::parseSymbols() {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (getTargetTriple().isOSBinFormatXCOFF() && isa<GlobalIFunc>(GV)) {
|
||||
if (isa<GlobalIFunc>(GV)) {
|
||||
addDefinedFunctionSymbol(Sym);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
18
llvm/test/LTO/X86/ifunc.ll
Normal file
18
llvm/test/LTO/X86/ifunc.ll
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
; RUN: llvm-as < %s >%t1
|
||||
; RUN: llvm-lto -o %t2 %t1
|
||||
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@f2 = dso_local alias void (), void ()* @f
|
||||
@f = dso_local ifunc void (), bitcast (i8* ()* @f_ifunc to void ()*)
|
||||
|
||||
define internal i8* @f_ifunc() {
|
||||
entry:
|
||||
ret i8* bitcast (void ()* @f_impl to i8*)
|
||||
}
|
||||
|
||||
define internal void @f_impl() {
|
||||
entry:
|
||||
ret void
|
||||
}
|
||||
Loading…
Reference in a new issue