}
EHFrameEdgeFixer::EHFrameEdgeFixer(StringRef EHFrameSectionName,
- Edge::Kind FDEToCIE, Edge::Kind FDEToPCBegin,
- Edge::Kind FDEToLSDA)
- : EHFrameSectionName(EHFrameSectionName), FDEToCIE(FDEToCIE),
- FDEToPCBegin(FDEToPCBegin), FDEToLSDA(FDEToLSDA) {}
+ Edge::Kind Delta64, Edge::Kind NegDelta32)
+ : EHFrameSectionName(EHFrameSectionName), Delta64(Delta64),
+ NegDelta32(NegDelta32) {}
Error EHFrameEdgeFixer::operator()(LinkGraph &G) {
auto *EHFrame = G.findSectionByName(EHFrameSectionName);
else
return CIEInfoOrErr.takeError();
assert(CIEInfo->CIESymbol && "CIEInfo has no CIE symbol set");
- B.addEdge(FDEToCIE, RecordOffset + CIEDeltaFieldOffset,
+ B.addEdge(NegDelta32, RecordOffset + CIEDeltaFieldOffset,
*CIEInfo->CIESymbol, 0);
} else {
LLVM_DEBUG({
auto PCBeginSym = getOrCreateSymbol(PC, PCBegin);
if (!PCBeginSym)
return PCBeginSym.takeError();
- B.addEdge(FDEToPCBegin, RecordOffset + PCBeginFieldOffset, *PCBeginSym,
- 0);
+ B.addEdge(Delta64, RecordOffset + PCBeginFieldOffset, *PCBeginSym, 0);
PCBeginBlock = &PCBeginSym->getBlock();
} else {
auto &EI = PCEdgeItr->second;
<< formatv("{0:x16}", RecordAddress + LSDAFieldOffset)
<< " to LSDA at " << formatv("{0:x16}", LSDA) << "\n";
});
- B.addEdge(FDEToLSDA, RecordOffset + LSDAFieldOffset, *LSDASym, 0);
+ B.addEdge(Delta64, RecordOffset + LSDAFieldOffset, *LSDASym, 0);
} else {
LLVM_DEBUG({
auto &EI = LSDAEdgeItr->second;
/// edges.
class EHFrameEdgeFixer {
public:
- EHFrameEdgeFixer(StringRef EHFrameSectionName, Edge::Kind FDEToCIE,
- Edge::Kind FDEToPCBegin, Edge::Kind FDEToLSDA);
+ EHFrameEdgeFixer(StringRef EHFrameSectionName, Edge::Kind Delta64,
+ Edge::Kind NegDelta32);
Error operator()(LinkGraph &G);
private:
Expected<Symbol &> getOrCreateSymbol(ParseContext &PC, JITTargetAddress Addr);
StringRef EHFrameSectionName;
- Edge::Kind FDEToCIE;
- Edge::Kind FDEToPCBegin;
- Edge::Kind FDEToLSDA;
+ Edge::Kind Delta64;
+ Edge::Kind NegDelta32;
};
} // end namespace jitlink
// Add eh-frame passses.
Config.PrePrunePasses.push_back(EHFrameSplitter("__eh_frame"));
Config.PrePrunePasses.push_back(
- EHFrameEdgeFixer("__eh_frame", NegDelta32, Delta64, Delta64));
+ EHFrameEdgeFixer("__eh_frame", Delta64, NegDelta32));
// Add a mark-live pass.
if (auto MarkLive = Ctx->getMarkLivePass(G->getTargetTriple()))