[llvm-commits] CVS: llvm/include/llvm/Type.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Mar 26 15:44:01 PST 2004
Changes in directory llvm/include/llvm:
Type.h updated: 1.41 -> 1.42
---
Log message:
Add two methods which have been needed for a long time: Type::get(Un)signedVersion
---
Diffs of the changes: (+10 -1)
Index: llvm/include/llvm/Type.h
diff -u llvm/include/llvm/Type.h:1.41 llvm/include/llvm/Type.h:1.42
--- llvm/include/llvm/Type.h:1.41 Mon Feb 16 21:03:36 2004
+++ llvm/include/llvm/Type.h Fri Mar 26 15:43:12 2004
@@ -212,9 +212,18 @@
///
unsigned getPrimitiveSize() const;
+ /// getUnsignedVersion - If this is an integer type, return the unsigned
+ /// variant of this type. For example int -> uint.
+ const Type *getUnsignedVersion() const;
+
+ /// getSignedVersion - If this is an integer type, return the signed variant
+ /// of this type. For example uint -> int.
+ const Type *getSignedVersion() const;
+
/// getForwaredType - Return the type that this type has been resolved to if
/// it has been resolved to anything. This is used to implement the
- /// union-find algorithm for type resolution.
+ /// union-find algorithm for type resolution, and shouldn't be used by general
+ /// purpose clients.
const Type *getForwardedType() const {
if (!ForwardType) return 0;
return getForwardedTypeInternal();
More information about the llvm-commits
mailing list