[llvm] f1ab90a - [IR] Use llvm::find (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 15:36:50 PST 2023


Author: Kazu Hirata
Date: 2023-12-17T15:36:42-08:00
New Revision: f1ab90ab632d137fc3c7deaa237751db31bcb22e

URL: https://github.com/llvm/llvm-project/commit/f1ab90ab632d137fc3c7deaa237751db31bcb22e
DIFF: https://github.com/llvm/llvm-project/commit/f1ab90ab632d137fc3c7deaa237751db31bcb22e.diff

LOG: [IR] Use llvm::find (NFC)

Added: 
    

Modified: 
    llvm/lib/IR/Metadata.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 7bc25e30b89327..515893d079b8cb 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -1566,7 +1566,7 @@ void Instruction::updateDIAssignIDMapping(DIAssignID *ID) {
            "Expect existing attachment to be mapped");
 
     auto &InstVec = InstrsIt->second;
-    auto *InstIt = std::find(InstVec.begin(), InstVec.end(), this);
+    auto *InstIt = llvm::find(InstVec, this);
     assert(InstIt != InstVec.end() &&
            "Expect instruction to be mapped to attachment");
     // The vector contains a ptr to this. If this is the only element in the


        


More information about the llvm-commits mailing list