From 6667bdbacad033f7090304fb559889a1ba08eab1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 2 Aug 2005 19:26:06 +0000 Subject: Update to use the new MathExtras.h support for log2 computation. Patch contributed by Jim Laskey! llvm-svn: 22594 --- llvm/lib/Target/TargetData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Target/TargetData.cpp') diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 3c71fdc3e0e..75e76fe1860 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/lib/Target/TargetData.cpp @@ -229,7 +229,7 @@ unsigned char TargetData::getTypeAlignment(const Type *Ty) const { 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 -- cgit v1.2.3