diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-10 15:03:06 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-10 15:03:06 +0000 |
commit | 6e9eeab69f0ce496d0120f9718e026f319d2ab01 (patch) | |
tree | f389bfb8de421b8380413c1f04454c2dbbea203c /include/llvm/IR/DataLayout.h | |
parent | e1820a6a4e5cfd1a41bd40ce6c21635d04289fec (diff) | |
download | llvm-6e9eeab69f0ce496d0120f9718e026f319d2ab01.tar.gz llvm-6e9eeab69f0ce496d0120f9718e026f319d2ab01.tar.bz2 llvm-6e9eeab69f0ce496d0120f9718e026f319d2ab01.tar.xz |
[C++11] Modernize the IR library a bit.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR/DataLayout.h')
-rw-r--r-- | include/llvm/IR/DataLayout.h | 8 |
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; } |