summaryrefslogtreecommitdiff
path: root/include/llvm/IR/DataLayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/DataLayout.h')
-rw-r--r--include/llvm/IR/DataLayout.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/IR/DataLayout.h b/include/llvm/IR/DataLayout.h
index d32b8402d6..8ad9bd0f4a 100644
--- a/include/llvm/IR/DataLayout.h
+++ b/include/llvm/IR/DataLayout.h
@@ -219,8 +219,8 @@ public:
/// The width is specified in bits.
///
bool isLegalInteger(unsigned Width) const {
- for (unsigned i = 0, e = (unsigned)LegalIntWidths.size(); i != e; ++i)
- if (LegalIntWidths[i] == Width)
+ for (unsigned LegalIntWidth : LegalIntWidths)
+ if (LegalIntWidth == Width)
return true;
return false;
}
@@ -283,8 +283,8 @@ public:
/// only supports i32 as a native integer type, then i27 fits in a legal
// integer type but i45 does not.
bool fitsInLegalInteger(unsigned Width) const {
- for (unsigned i = 0, e = (unsigned)LegalIntWidths.size(); i != e; ++i)
- if (Width <= LegalIntWidths[i])
+ for (unsigned LegalIntWidth : LegalIntWidths)
+ if (Width <= LegalIntWidth)
return true;
return false;
}