summaryrefslogtreecommitdiff
path: root/include/llvm/Type.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-18 04:54:35 +0000
committerChris Lattner <sabre@nondot.org>2011-07-18 04:54:35 +0000
commitdb125cfaf57cc83e7dd7453de2d509bc8efd0e5e (patch)
treea163ac0f83da7be3f9675a122a6144b12418be09 /include/llvm/Type.h
parent4b3d5469fb7c25504fa20dc65640f02d79675d48 (diff)
downloadllvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.gz
llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.bz2
llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.xz
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r--include/llvm/Type.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h
index e4ff3e1c8d..43b7dc5788 100644
--- a/include/llvm/Type.h
+++ b/include/llvm/Type.h
@@ -193,7 +193,7 @@ public:
/// are valid for types of the same size only where no re-interpretation of
/// the bits is done.
/// @brief Determine if this type could be losslessly bitcast to Ty
- bool canLosslesslyBitCastTo(const Type *Ty) const;
+ bool canLosslesslyBitCastTo(Type *Ty) const;
/// isEmptyTy - Return true if this type is empty, that is, it has no
/// elements or all its elements are empty.
@@ -262,7 +262,7 @@ public:
/// getScalarSizeInBits - If this is a vector type, return the
/// getPrimitiveSizeInBits value for the element type. Otherwise return the
/// getPrimitiveSizeInBits value for this type.
- unsigned getScalarSizeInBits() const;
+ unsigned getScalarSizeInBits();
/// getFPMantissaWidth - Return the width of the mantissa of this type. This
/// is only valid on floating point types. If the FP type does not
@@ -271,7 +271,7 @@ public:
/// getScalarType - If this is a vector type, return the element type,
/// otherwise return 'this'.
- const Type *getScalarType() const;
+ Type *getScalarType();
//===--------------------------------------------------------------------===//
// Type Iteration support.
@@ -342,7 +342,7 @@ public:
/// getPointerTo - Return a pointer to the current type. This is equivalent
/// to PointerType::get(Foo, AddrSpace).
- PointerType *getPointerTo(unsigned AddrSpace = 0) const;
+ PointerType *getPointerTo(unsigned AddrSpace = 0);
private:
/// isSizedDerivedType - Derived types like structures and arrays are sized
@@ -352,7 +352,7 @@ private:
};
// Printing of types.
-static inline raw_ostream &operator<<(raw_ostream &OS, const Type &T) {
+static inline raw_ostream &operator<<(raw_ostream &OS, Type &T) {
T.print(OS);
return OS;
}
@@ -387,7 +387,7 @@ template <> struct GraphTraits<const Type*> {
typedef const Type NodeType;
typedef Type::subtype_iterator ChildIteratorType;
- static inline NodeType *getEntryNode(const Type *T) { return T; }
+ static inline NodeType *getEntryNode(NodeType *T) { return T; }
static inline ChildIteratorType child_begin(NodeType *N) {
return N->subtype_begin();
}