diff options
author | Owen Anderson <resistor@mac.com> | 2007-09-07 04:06:50 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-09-07 04:06:50 +0000 |
commit | e2f23a3abf7518a27a3e4e0342093190496d1b9f (patch) | |
tree | adbc06f83b198727d50363db6a33585a24df2dd5 /llvm/lib/Target/ARM/ARMInstrInfo.cpp | |
parent | 3ce57c6baf0961108f76d3d377ff554b765b848e (diff) | |
download | bcm5719-llvm-e2f23a3abf7518a27a3e4e0342093190496d1b9f.tar.gz bcm5719-llvm-e2f23a3abf7518a27a3e4e0342093190496d1b9f.zip |
Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!
llvm-svn: 41758
Diffstat (limited to 'llvm/lib/Target/ARM/ARMInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.cpp b/llvm/lib/Target/ARM/ARMInstrInfo.cpp index b404ec078e5..0ec3b9f72b0 100644 --- a/llvm/lib/Target/ARM/ARMInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMInstrInfo.cpp @@ -17,6 +17,7 @@ #include "ARMAddressingModes.h" #include "ARMGenInstrInfo.inc" #include "ARMMachineFunctionInfo.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/CodeGen/LiveVariables.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" @@ -28,7 +29,7 @@ static cl::opt<bool> EnableARM3Addr("enable-arm-3-addr-conv", cl::Hidden, cl::desc("Enable ARM 2-addr to 3-addr conv")); ARMInstrInfo::ARMInstrInfo(const ARMSubtarget &STI) - : TargetInstrInfo(ARMInsts, sizeof(ARMInsts)/sizeof(ARMInsts[0])), + : TargetInstrInfo(ARMInsts, array_lengthof(ARMInsts)), RI(*this, STI) { } |