add helper method.
authorChris Lattner <sabre@nondot.org>
Sat, 10 Feb 2007 19:54:24 +0000 (19:54 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 10 Feb 2007 19:54:24 +0000 (19:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34155 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/ManagedStatic.h

index e1585bafa80d28fc4083ea679656cd8311d80e64..a9e7e96b5d7c9e064a3da05c40b6893f664a60d6 100644 (file)
@@ -34,6 +34,9 @@ protected:
   
   void RegisterManagedStatic(void *ObjPtr, void (*deleter)(void*)) const;
 public:
+  /// isConstructed - Return true if this object has not been created yet.  
+  bool isConstructed() const { return Ptr != 0; }
+  
   void destroy() const;
 };