[llvm-commits] [llvm] r71426 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/Target/TargetData.cpp
Chris Lattner
clattner at apple.com
Mon May 11 09:25:47 PDT 2009
On May 11, 2009, at 4:14 AM, Jay Foad wrote:
> Author: foad
> Date: Mon May 11 06:13:47 2009
> New Revision: 71426
>
> URL: http://llvm.org/viewvc/llvm-project?rev=71426&view=rev
> Log:
> Change TargetData::getIntPtrType() to return an IntegerType instead of
> just a Type.
Ok,
> +++ llvm/trunk/include/llvm/Target/TargetData.h Mon May 11 06:13:47
> 2009
> @@ -23,13 +23,12 @@
> #include "llvm/Pass.h"
> #include "llvm/Support/DataTypes.h"
> #include "llvm/ADT/SmallVector.h"
> +#include "llvm/DerivedTypes.h"
Can you just use a forward declaration of IntegerType instead of a
#include?
-Chris
>
> #include <string>
>
> namespace llvm {
>
> class Value;
> -class Type;
> -class StructType;
> class StructLayout;
> class GlobalVariable;
>
> @@ -228,7 +227,7 @@
> /// getIntPtrType - Return an unsigned integer type that is the
> same size or
> /// greater to the host pointer size.
> ///
> - const Type *getIntPtrType() const;
> + const IntegerType *getIntPtrType() const;
>
> /// getIndexedOffset - return the offset from the beginning of the
> type for
> /// the specified indices. This is used to implement getelementptr.
>
> Modified: llvm/trunk/lib/Target/TargetData.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=71426&r1=71425&r2=71426&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Target/TargetData.cpp (original)
> +++ llvm/trunk/lib/Target/TargetData.cpp Mon May 11 06:13:47 2009
> @@ -535,7 +535,7 @@
>
> /// getIntPtrType - Return an unsigned integer type that is the same
> size or
> /// greater to the host pointer size.
> -const Type *TargetData::getIntPtrType() const {
> +const IntegerType *TargetData::getIntPtrType() const {
> return IntegerType::get(getPointerSizeInBits());
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list