aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcInstrInfo.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-09-07 04:06:50 +0000
committerOwen Anderson <resistor@mac.com>2007-09-07 04:06:50 +0000
commit718cb665ca6ce2bc4d8e8479f46a45db91b49f86 (patch)
tree51ddca6b6eead9bf38aafd5507e6c3c06048f0ad /lib/Target/Sparc/SparcInstrInfo.cpp
parentaf992f782fb2cac8d00b352c3dd73f6e782b5758 (diff)
Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcInstrInfo.cpp')
-rw-r--r--lib/Target/Sparc/SparcInstrInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/Sparc/SparcInstrInfo.cpp b/lib/Target/Sparc/SparcInstrInfo.cpp
index a8c822ae9a..4b956b6c89 100644
--- a/lib/Target/Sparc/SparcInstrInfo.cpp
+++ b/lib/Target/Sparc/SparcInstrInfo.cpp
@@ -13,12 +13,13 @@
#include "SparcInstrInfo.h"
#include "Sparc.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "SparcGenInstrInfo.inc"
using namespace llvm;
SparcInstrInfo::SparcInstrInfo(SparcSubtarget &ST)
- : TargetInstrInfo(SparcInsts, sizeof(SparcInsts)/sizeof(SparcInsts[0])),
+ : TargetInstrInfo(SparcInsts, array_lengthof(SparcInsts)),
RI(ST, *this) {
}