diff options
author | Kazu Hirata <kazu@google.com> | 2021-12-09 09:37:29 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-12-09 09:37:29 -0800 |
commit | ccdd5bb2c2a80b9664e8f2e9e1abd80769f5c5a1 (patch) | |
tree | 5006ed274b06eb030ea8daeb9a6b2b71dbd252b2 /llvm/lib/MC/MCWin64EH.cpp | |
parent | 9cfd8d7c6ca46c6ba51142ec21fd6543afcba08a (diff) | |
download | llvm-ccdd5bb2c2a80b9664e8f2e9e1abd80769f5c5a1.zip llvm-ccdd5bb2c2a80b9664e8f2e9e1abd80769f5c5a1.tar.gz llvm-ccdd5bb2c2a80b9664e8f2e9e1abd80769f5c5a1.tar.bz2 |
[llvm] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/MC/MCWin64EH.cpp')
-rw-r--r-- | llvm/lib/MC/MCWin64EH.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCWin64EH.cpp b/llvm/lib/MC/MCWin64EH.cpp index 7773d88..2a93c35 100644 --- a/llvm/lib/MC/MCWin64EH.cpp +++ b/llvm/lib/MC/MCWin64EH.cpp @@ -351,7 +351,7 @@ static uint32_t ARM64CountOfUnwindCodes(ArrayRef<WinEH::Instruction> Insns) { // Unwind opcode encodings and restrictions are documented at // https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling static void ARM64EmitUnwindCode(MCStreamer &streamer, const MCSymbol *begin, - WinEH::Instruction &inst) { + const WinEH::Instruction &inst) { uint8_t b, reg; switch (static_cast<Win64EH::UnwindOpcodes>(inst.Operation)) { default: @@ -1050,10 +1050,8 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info, // Emit epilog unwind instructions for (auto &I : info->EpilogMap) { auto &EpilogInstrs = I.second; - for (uint32_t i = 0; i < EpilogInstrs.size(); i++) { - WinEH::Instruction inst = EpilogInstrs[i]; + for (const WinEH::Instruction &inst : EpilogInstrs) ARM64EmitUnwindCode(streamer, info->Begin, inst); - } } int32_t BytesMod = CodeWords * 4 - TotalCodeBytes; |