diff options
| author | Kazu Hirata <kazu@google.com> | 2021-12-12 16:13:49 -0800 |
|---|---|---|
| committer | Kazu Hirata <kazu@google.com> | 2021-12-12 16:13:49 -0800 |
| commit | bb6447a78c587dd211dbe0c02066c30140b1da27 (patch) | |
| tree | dff9256d09bcb1e88dd0aaddb4a8898764fcbd00 /llvm/lib/CodeGen/MachineFunction.cpp | |
| parent | 9ad5969b5e07e24d14de575533efccfc4162e043 (diff) | |
[llvm] Use llvm::reverse (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 1d4e1fbdd803..81ed3d0e93ff 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -771,8 +771,8 @@ MCSymbol *MachineFunction::addLandingPad(MachineBasicBlock *LandingPad) { void MachineFunction::addCatchTypeInfo(MachineBasicBlock *LandingPad, ArrayRef<const GlobalValue *> TyInfo) { LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); - for (unsigned N = TyInfo.size(); N; --N) - LP.TypeIds.push_back(getTypeIDFor(TyInfo[N - 1])); + for (const GlobalValue *GV : llvm::reverse(TyInfo)) + LP.TypeIds.push_back(getTypeIDFor(GV)); } void MachineFunction::addFilterTypeInfo(MachineBasicBlock *LandingPad, |
