[LTO] Handle GlobalIFunc in LTOModule::parseSymbols (#212515)
Avoids the assert immediately below. Fixes #45694 rdar://182744700 (cherry picked from commit a463071dc427777a2a2bfc155c6680d7ff220994)
This commit is contained in:
1 parent
1b1145f564
commit
b7d8db9dde
2 files changed
+19
-1
No files matched your search
@@ -611,7 +611,7 @@ void LTOModule::parseSymbols() {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (getTargetTriple().isOSBinFormatXCOFF() && isa<GlobalIFunc>(GV)) {
|
||||
if (isa<GlobalIFunc>(GV)) {
|
||||
addDefinedFunctionSymbol(Sym);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user