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 | 718cb665ca6ce2bc4d8e8479f46a45db91b49f86 (patch) | |
tree | 51ddca6b6eead9bf38aafd5507e6c3c06048f0ad /lib/Target/X86/X86InstrInfo.cpp | |
parent | af992f782fb2cac8d00b352c3dd73f6e782b5758 (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/X86/X86InstrInfo.cpp')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index f34fcf0036..017c799837 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -17,13 +17,14 @@ #include "X86InstrBuilder.h" #include "X86Subtarget.h" #include "X86TargetMachine.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/LiveVariables.h" #include "llvm/CodeGen/SSARegMap.h" using namespace llvm; X86InstrInfo::X86InstrInfo(X86TargetMachine &tm) - : TargetInstrInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0])), + : TargetInstrInfo(X86Insts, array_lengthof(X86Insts)), TM(tm), RI(tm, *this) { } |