summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMISelLowering.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/ARM/ARMISelLowering.cpp
parentd8fdb628ea86001e64bec1bbee8bbfa7982cf80c (diff)
downloadllvm-b9df53a40b22c74ce3f3a7b4a7c0676a38cf5e73.tar.gz
llvm-b9df53a40b22c74ce3f3a7b4a7c0676a38cf5e73.tar.bz2
llvm-b9df53a40b22c74ce3f3a7b4a7c0676a38cf5e73.tar.xz
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/ARM/ARMISelLowering.cpp')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index cc323f684f..fdc015b80a 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -2732,7 +2732,7 @@ ARMTargetLowering::StoreByValRegs(CCState &CCInfo, SelectionDAG &DAG,
lastRegToSaveIndex = REnd - ARM::R0;
} else {
firstRegToSaveIndex = CCInfo.getFirstUnallocated
- (GPRArgRegs, sizeof(GPRArgRegs) / sizeof(GPRArgRegs[0]));
+ (GPRArgRegs, array_lengthof(GPRArgRegs));
lastRegToSaveIndex = 4;
}