diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-07-15 03:38:40 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-07-15 03:38:40 +0000 |
commit | b960232518a1cd79c5f64ab5ef54c88e34660191 (patch) | |
tree | 7f94ec980cc97100437556bbf15be79bf6827d81 /lib/CodeGen/CGRTTI.cpp | |
parent | 0f855a9c2517fc80803ab81a4aa0bb015918cf21 (diff) | |
download | clang-b960232518a1cd79c5f64ab5ef54c88e34660191.tar.gz clang-b960232518a1cd79c5f64ab5ef54c88e34660191.tar.bz2 clang-b960232518a1cd79c5f64ab5ef54c88e34660191.tar.xz |
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r-- | lib/CodeGen/CGRTTI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp index 23e8e452fe..72d4220789 100644 --- a/lib/CodeGen/CGRTTI.cpp +++ b/lib/CodeGen/CGRTTI.cpp @@ -972,6 +972,6 @@ void CodeGenModule::EmitFundamentalRTTIDescriptors() { Context.UnsignedLongLongTy, Context.FloatTy, Context.DoubleTy, Context.LongDoubleTy, Context.Char16Ty, Context.Char32Ty }; - for (unsigned i = 0; i < sizeof(FundamentalTypes)/sizeof(QualType); ++i) + for (unsigned i = 0; i < llvm::array_lengthof(FundamentalTypes); ++i) EmitFundamentalRTTIDescriptor(FundamentalTypes[i]); } |