From 7524b5906267e8ea8322c2ef4334f6e3bf0e6d24 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Mon, 11 May 2009 11:13:47 +0000 Subject: [PATCH] Change TargetData::getIntPtrType() to return an IntegerType instead of just a Type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71426 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetData.h | 5 ++--- lib/Target/TargetData.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h index 71236c021fe..9c8b1d3a2ad 100644 --- a/include/llvm/Target/TargetData.h +++ b/include/llvm/Target/TargetData.h @@ -23,13 +23,12 @@ #include "llvm/Pass.h" #include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/DerivedTypes.h" #include namespace llvm { class Value; -class Type; -class StructType; class StructLayout; class GlobalVariable; @@ -228,7 +227,7 @@ public: /// 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. diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 3ff1f0b20b1..67fefbb70b6 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -535,7 +535,7 @@ unsigned char TargetData::getPreferredTypeAlignmentShift(const Type *Ty) const { /// 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()); }