aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-08 21:50:15 +0000
committerChris Lattner <sabre@nondot.org>2002-04-08 21:50:15 +0000
commit12e8ad6858ccf3c0487c16297b6810fcc92d0026 (patch)
treeb0e33eed00cc5dd4b65edfccbd1070499211d6bd
parent589df88ba03a81b2b3dc9d084c191a3a74724ecd (diff)
* Fix comment
* Add printing support * add isFloatingPoint method * Remove isXXXType() methods for non-derived types git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2167 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Type.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h
index 07d9615ba9..60601002de 100644
--- a/include/llvm/Type.h
+++ b/include/llvm/Type.h
@@ -1,7 +1,7 @@
//===-- llvm/Type.h - Classes for handling data types ------------*- C++ -*--=//
//
// This file contains the declaration of the Type class. For more "Type" type
-// stuff, look in DerivedTypes.h and Opt/ConstantHandling.h
+// stuff, look in DerivedTypes.h.
//
// Note that instances of the Type class are immutable: once they are created,
// they are never changed. Also note that only one instance of a particular
@@ -98,6 +98,7 @@ protected:
inline void setRecursive(bool Val) { Recursive = Val; }
public:
+ virtual void print(std::ostream &O) const;
//===--------------------------------------------------------------------===//
// Property accessors for dealing with types...
@@ -132,6 +133,10 @@ public:
//
virtual bool isIntegral() const { return 0; }
+ // isFloatingPoint - Return true if this is one of the two floating point
+ // types
+ bool isFloatingPoint() const { return ID == FloatTyID || ID == DoubleTyID; }
+
// isAbstract - True if the type is either an Opaque type, or is a derived
// type that includes an opaque type somewhere in it.
//
@@ -214,8 +219,6 @@ public:
// Methods for determining the subtype of this Type. This section defines a
// family of isArrayType(), isLabelType(), etc functions...
//
-#define HANDLE_PRIM_TYPE(NAME, SIZE) \
- inline bool is##NAME##Type() const { return ID == NAME##TyID; }
#define HANDLE_DERV_TYPE(NAME, CLASS) \
inline bool is##NAME##Type() const { return ID == NAME##TyID; }