================ @@ -27,25 +28,55 @@ namespace bolt { /// Set CallSiteInfo destination fields from \p Symbol and return a target /// BinaryFunction for that symbol. -static const BinaryFunction *setCSIDestination(const BinaryContext &BC, - yaml::bolt::CallSiteInfo &CSI, - const MCSymbol *Symbol) { +static const BinaryFunction * +setCSIDestination(const BinaryContext &BC, yaml::bolt::CallSiteInfo &CSI, + const MCSymbol *Symbol, const BoltAddressTranslation *BAT) { CSI.DestId = 0; // designated for unknown functions CSI.EntryDiscriminator = 0; + auto setBATSecondaryEntry = [&](const BinaryFunction *const Callee) { + // The symbol could be a secondary entry in a cold fragment. + ErrorOr<uint64_t> SymbolValue = BC.getSymbolValue(*Symbol); + if (SymbolValue.getError()) ---------------- maksfb wrote:
Can we get a condition when `getFunctionForSymbol(Symbol)` return a function, but the symbol has no set value? https://github.com/llvm/llvm-project/pull/86219 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits