aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCInstrInfo.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
commit1636de94069d492185da2dd36859d4a1962a2eed (patch)
tree51ddca6b6eead9bf38aafd5507e6c3c06048f0ad /lib/Target/PowerPC/PPCInstrInfo.cpp
parente97f07714219e0407f908428c157ba7ec0cbf2dd (diff)
downloadexternal_llvm-1636de94069d492185da2dd36859d4a1962a2eed.zip
external_llvm-1636de94069d492185da2dd36859d4a1962a2eed.tar.gz
external_llvm-1636de94069d492185da2dd36859d4a1962a2eed.tar.bz2
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/PowerPC/PPCInstrInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp
index d7ee5ed..83433d6 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -15,11 +15,12 @@
#include "PPCPredicates.h"
#include "PPCGenInstrInfo.inc"
#include "PPCTargetMachine.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
using namespace llvm;
PPCInstrInfo::PPCInstrInfo(PPCTargetMachine &tm)
- : TargetInstrInfo(PPCInsts, sizeof(PPCInsts)/sizeof(PPCInsts[0])), TM(tm),
+ : TargetInstrInfo(PPCInsts, array_lengthof(PPCInsts)), TM(tm),
RI(*TM.getSubtargetImpl(), *this) {}
/// getPointerRegClass - Return the register class to use to hold pointers.