diff options
author | Martin Storsjö <martin@martin.st> | 2022-05-18 10:32:47 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2022-06-01 11:25:48 +0300 |
commit | e71b07e468b34b18519102a58c20e32ee716976b (patch) | |
tree | 62faa6b5ec72fcf21ee7fc42cacb62a42994919b /llvm/lib/MC/MCWin64EH.cpp | |
parent | a159128811ae1d0a781dbc8590fa1e0f26642f82 (diff) | |
download | llvm-e71b07e468b34b18519102a58c20e32ee716976b.zip llvm-e71b07e468b34b18519102a58c20e32ee716976b.tar.gz llvm-e71b07e468b34b18519102a58c20e32ee716976b.tar.bz2 |
[MC] [Win64EH] Wrap the epilog instructions in a struct. NFC.
For ARM SEH, the epilogs will need a little more associated data than
just the plain list of opcodes.
This is a preparatory refactoring for D125645.
Differential Revision: https://reviews.llvm.org/D125879
Diffstat (limited to 'llvm/lib/MC/MCWin64EH.cpp')
-rw-r--r-- | llvm/lib/MC/MCWin64EH.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCWin64EH.cpp b/llvm/lib/MC/MCWin64EH.cpp index bc73685..8f9108a 100644 --- a/llvm/lib/MC/MCWin64EH.cpp +++ b/llvm/lib/MC/MCWin64EH.cpp @@ -525,7 +525,7 @@ FindMatchingEpilog(const std::vector<WinEH::Instruction>& EpilogInstrs, auto InstrsIter = info->EpilogMap.find(EpilogStart); assert(InstrsIter != info->EpilogMap.end() && "Epilog not found in EpilogMap"); - const auto &Instrs = InstrsIter->second; + const auto &Instrs = InstrsIter->second.Instructions; if (Instrs.size() != EpilogInstrs.size()) continue; @@ -633,7 +633,7 @@ static int checkPackedEpilog(MCStreamer &streamer, WinEH::FrameInfo *info, return -1; const std::vector<WinEH::Instruction> &Epilog = - info->EpilogMap.begin()->second; + info->EpilogMap.begin()->second.Instructions; // Check that the epilog actually is at the very end of the function, // otherwise it can't be packed. @@ -931,7 +931,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info, simplifyOpcodes(info->Instructions, false); for (auto &I : info->EpilogMap) - simplifyOpcodes(I.second, true); + simplifyOpcodes(I.second.Instructions, true); MCContext &context = streamer.getContext(); MCSymbol *Label = context.createTempSymbol(); @@ -1003,7 +1003,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info, for (auto &I : info->EpilogMap) { MCSymbol *EpilogStart = I.first; - auto &EpilogInstrs = I.second; + auto &EpilogInstrs = I.second.Instructions; uint32_t CodeBytes = ARM64CountOfUnwindCodes(EpilogInstrs); MCSymbol* MatchingEpilog = @@ -1085,7 +1085,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info, // Emit epilog unwind instructions for (auto &I : info->EpilogMap) { - auto &EpilogInstrs = I.second; + auto &EpilogInstrs = I.second.Instructions; for (const WinEH::Instruction &inst : EpilogInstrs) ARM64EmitUnwindCode(streamer, inst); } |