[llvm] [llvm] Support IFuncs on Darwin platforms (PR #73686)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 11:34:21 PST 2023
================
@@ -144,7 +144,12 @@ bool CallLowering::lowerCall(MachineIRBuilder &MIRBuilder, const CallBase &CB,
// Try looking through a bitcast from one function type to another.
// Commonly happens with calls to objc_msgSend().
const Value *CalleeV = CB.getCalledOperand()->stripPointerCasts();
- if (const Function *F = dyn_cast<Function>(CalleeV))
+ if (const GlobalIFunc *IF = dyn_cast<GlobalIFunc>(CalleeV);
+ IF && MF.getTarget().getTargetTriple().isOSBinFormatMachO()) {
+ // ld64 requires that .symbol_resolvers to be called via a stub, so these
+ // must always be a diret call.
----------------
aemerson wrote:
typo "direct"
https://github.com/llvm/llvm-project/pull/73686
More information about the llvm-commits
mailing list