[llvm-commits] CVS: llvm/lib/Target/TargetData.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 2 12:25:16 PDT 2005



Changes in directory llvm/lib/Target:

TargetData.cpp updated: 1.56 -> 1.57
---
Log message:

Update to use the new MathExtras.h support for log2 computation.
Patch contributed by Jim Laskey!



---
Diffs of the changes:  (+1 -1)

 TargetData.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/TargetData.cpp
diff -u llvm/lib/Target/TargetData.cpp:1.56 llvm/lib/Target/TargetData.cpp:1.57
--- llvm/lib/Target/TargetData.cpp:1.56	Thu Apr 21 17:55:34 2005
+++ llvm/lib/Target/TargetData.cpp	Tue Aug  2 14:25:02 2005
@@ -229,7 +229,7 @@
 unsigned char TargetData::getTypeAlignmentShift(const Type *Ty) const {
   unsigned Align = getTypeAlignment(Ty);
   assert(!(Align & (Align-1)) && "Alignment is not a power of two!");
-  return log2(Align);
+  return Log2_32(Align);
 }
 
 /// getIntPtrType - Return an unsigned integer type that is the same size or






More information about the llvm-commits mailing list