summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5871321e493670b0a440f45ba466da8713a1d8f2 (patch)
tree859b8b2dd669dfed2f574c70a933d84aef7d2637 /llvm/lib/Target/R600/AMDGPUISelLowering.cpp
parente5ce831c7c364180611deccef5e158a1c4fd0c09 (diff)
downloadbcm5719-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/AMDGPUISelLowering.cpp')
-rw-r--r--llvm/lib/Target/R600/AMDGPUISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp b/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
index 9891ad32fa7..3629d74baeb 100644
--- a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
+++ b/llvm/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];
OpenPOWER on IntegriCloud