diff options
author | Kazu Hirata <kazu@google.com> | 2024-01-31 23:54:05 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2024-01-31 23:54:05 -0800 |
commit | e8512786fedbfa6ddba70ceddc29d7122173ba5e (patch) | |
tree | 0f9417ca0f81b05e30067f7450fc4ae93147c5b8 /llvm/lib/IR/DebugInfo.cpp | |
parent | 7ec996d4c5c30083b070be4898140440094e6b97 (diff) | |
download | llvm-e8512786fedbfa6ddba70ceddc29d7122173ba5e.zip llvm-e8512786fedbfa6ddba70ceddc29d7122173ba5e.tar.gz llvm-e8512786fedbfa6ddba70ceddc29d7122173ba5e.tar.bz2 |
[IR] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index d8c1b0d..2cf8829 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -400,8 +400,8 @@ static MDNode *updateLoopMetadataDebugLocationsImpl( // Save space for the self-referential LoopID. SmallVector<Metadata *, 4> MDs = {nullptr}; - for (unsigned i = 1; i < OrigLoopID->getNumOperands(); ++i) { - Metadata *MD = OrigLoopID->getOperand(i); + for (const MDOperand &MDO : llvm::drop_begin(OrigLoopID->operands())) { + Metadata *MD = MDO; if (!MD) MDs.push_back(nullptr); else if (Metadata *NewMD = Updater(MD)) |