diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-26 21:43:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-26 21:43:22 +0000 |
commit | e3651f00e887fe2400d6c344547577110e14777e (patch) | |
tree | 98c51b444b23d7e68560f3fb2a755f7f8bc7df98 /include/llvm/Type.h | |
parent | 40bdfe555443abc5f4545cfa38745800b3908dfe (diff) |
Add two methods which have been needed for a long time: Type::get(Un)signedVersion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r-- | include/llvm/Type.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h index 960af949b1..e1fef6c882 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -212,9 +212,18 @@ public: /// 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(); |