diff options
author | Kazu Hirata <kazu@google.com> | 2021-12-04 08:48:04 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-12-04 08:48:05 -0800 |
commit | ca2f53897a2f2a60d8cb1538d5fcf930d814e9f5 (patch) | |
tree | cd2bcfd63e9420e1fb854e1a7497afebceeca658 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 8bd62119f9e9b0ee92cb7a78d1161e86293a8163 (diff) | |
download | llvm-ca2f53897a2f2a60d8cb1538d5fcf930d814e9f5.zip llvm-ca2f53897a2f2a60d8cb1538d5fcf930d814e9f5.tar.gz llvm-ca2f53897a2f2a60d8cb1538d5fcf930d814e9f5.tar.bz2 |
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 310c272..ff3a39e 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -1404,10 +1404,10 @@ MachineConstantPool::~MachineConstantPool() { // A constant may be a member of both Constants and MachineCPVsSharingEntries, // so keep track of which we've deleted to avoid double deletions. DenseSet<MachineConstantPoolValue*> Deleted; - for (unsigned i = 0, e = Constants.size(); i != e; ++i) - if (Constants[i].isMachineConstantPoolEntry()) { - Deleted.insert(Constants[i].Val.MachineCPVal); - delete Constants[i].Val.MachineCPVal; + for (const MachineConstantPoolEntry &C : Constants) + if (C.isMachineConstantPoolEntry()) { + Deleted.insert(C.Val.MachineCPVal); + delete C.Val.MachineCPVal; } for (MachineConstantPoolValue *CPV : MachineCPVsSharingEntries) { if (Deleted.count(CPV) == 0) |