aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/R600/AMDGPUISelLowering.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-07-15 04:27:47 +0000
committerCraig Topper <craig.topper@gmail.com>2013-07-15 04:27:47 +0000
commitb9df53a40b22c74ce3f3a7b4a7c0676a38cf5e73 (patch)
tree379b31d1b5945030b21c8fb5be73e9d4df5cfe45 /lib/Target/R600/AMDGPUISelLowering.cpp
parentd8fdb628ea86001e64bec1bbee8bbfa7982cf80c (diff)
downloadexternal_llvm-b9df53a40b22c74ce3f3a7b4a7c0676a38cf5e73.tar.gz
external_llvm-b9df53a40b22c74ce3f3a7b4a7c0676a38cf5e73.tar.bz2
external_llvm-b9df53a40b22c74ce3f3a7b4a7c0676a38cf5e73.zip
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186301 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/AMDGPUISelLowering.cpp')
-rw-r--r--lib/Target/R600/AMDGPUISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp
index 9891ad32fa..3629d74bae 100644
--- a/lib/Target/R600/AMDGPUISelLowering.cpp
+++ b/lib/Target/R600/AMDGPUISelLowering.cpp
@@ -82,7 +82,7 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
(int)MVT::v2i32,
(int)MVT::v4i32
};
- size_t NumTypes = sizeof(types) / sizeof(*types);
+ const size_t NumTypes = array_lengthof(types);
for (unsigned int x = 0; x < NumTypes; ++x) {
MVT::SimpleValueType VT = (MVT::SimpleValueType)types[x];