diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-07-15 04:27:47 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-07-15 04:27:47 +0000 |
commit | 5871321e493670b0a440f45ba466da8713a1d8f2 (patch) | |
tree | 859b8b2dd669dfed2f574c70a933d84aef7d2637 /llvm/lib/Target/R600/AMDILISelLowering.cpp | |
parent | e5ce831c7c364180611deccef5e158a1c4fd0c09 (diff) | |
download | bcm5719-llvm-5871321e493670b0a440f45ba466da8713a1d8f2.tar.gz bcm5719-llvm-5871321e493670b0a440f45ba466da8713a1d8f2.zip |
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
llvm-svn: 186301
Diffstat (limited to 'llvm/lib/Target/R600/AMDILISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/R600/AMDILISelLowering.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/R600/AMDILISelLowering.cpp b/llvm/lib/Target/R600/AMDILISelLowering.cpp index d669966cce2..95e785b7a1e 100644 --- a/llvm/lib/Target/R600/AMDILISelLowering.cpp +++ b/llvm/lib/Target/R600/AMDILISelLowering.cpp @@ -82,10 +82,10 @@ void AMDGPUTargetLowering::InitAMDILLowering() { (int)MVT::v2f64, (int)MVT::v2i64 }; - size_t NumTypes = sizeof(types) / sizeof(*types); - size_t NumFloatTypes = sizeof(FloatTypes) / sizeof(*FloatTypes); - size_t NumIntTypes = sizeof(IntTypes) / sizeof(*IntTypes); - size_t NumVectorTypes = sizeof(VectorTypes) / sizeof(*VectorTypes); + const size_t NumTypes = array_lengthof(types); + const size_t NumFloatTypes = array_lengthof(FloatTypes); + const size_t NumIntTypes = array_lengthof(IntTypes); + const size_t NumVectorTypes = array_lengthof(VectorTypes); const AMDGPUSubtarget &STM = getTargetMachine().getSubtarget<AMDGPUSubtarget>(); // These are the current register classes that are |