summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.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
commite2f23a3abf7518a27a3e4e0342093190496d1b9f (patch)
treeadbc06f83b198727d50363db6a33585a24df2dd5 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent3ce57c6baf0961108f76d3d377ff554b765b848e (diff)
downloadbcm5719-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/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 9597696d2dc..2dbd4e8c7e4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -18,6 +18,7 @@
#include "llvm/DerivedTypes.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"
using namespace llvm;
@@ -145,8 +146,7 @@ TargetLowering::TargetLowering(TargetMachine &tm)
ShiftAmountTy = SetCCResultTy = PointerTy = getValueType(TD->getIntPtrType());
ShiftAmtHandling = Undefined;
memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*));
- memset(TargetDAGCombineArray, 0,
- sizeof(TargetDAGCombineArray)/sizeof(TargetDAGCombineArray[0]));
+ memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray));
maxStoresPerMemset = maxStoresPerMemcpy = maxStoresPerMemmove = 8;
allowUnalignedMemoryAccesses = false;
UseUnderscoreSetJmp = false;
OpenPOWER on IntegriCloud