aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorJustin Lebar <justin.lebar@gmail.com>2024-03-10 20:00:13 -0700
committerGitHub <noreply@github.com>2024-03-10 20:00:13 -0700
commitfab2bb8bfda865bd438dee981d7be7df8017b76d (patch)
tree358f27c327a6eb2628f357f08910d3f6ee903ac9 /llvm/lib/IR/DataLayout.cpp
parent6bec4fc76de50a090d1d0b36498da66c4a324851 (diff)
downloadllvm-fab2bb8bfda865bd438dee981d7be7df8017b76d.zip
llvm-fab2bb8bfda865bd438dee981d7be7df8017b76d.tar.gz
llvm-fab2bb8bfda865bd438dee981d7be7df8017b76d.tar.bz2
Add llvm::min/max_element and use it in llvm/ and mlir/ directories. (#84678)
For some reason this was missing from STLExtras.
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index a2f5714..27411653 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -898,7 +898,7 @@ Type *DataLayout::getSmallestLegalIntType(LLVMContext &C, unsigned Width) const
}
unsigned DataLayout::getLargestLegalIntTypeSizeInBits() const {
- auto Max = std::max_element(LegalIntWidths.begin(), LegalIntWidths.end());
+ auto Max = llvm::max_element(LegalIntWidths);
return Max != LegalIntWidths.end() ? *Max : 0;
}