aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/ManagedStatic.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-10 19:54:24 +0000
committerChris Lattner <sabre@nondot.org>2007-02-10 19:54:24 +0000
commit68ce9ba666a7eb8c7eb3fb7888e4418fffd2e716 (patch)
treef6e55c295e2b7c028ea9e0c05349b7f972d48cee /include/llvm/Support/ManagedStatic.h
parentec6478b8f39779685d17849656015fc22fa7ac1b (diff)
add helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ManagedStatic.h')
-rw-r--r--include/llvm/Support/ManagedStatic.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/ManagedStatic.h b/include/llvm/Support/ManagedStatic.h
index e1585bafa8..a9e7e96b5d 100644
--- a/include/llvm/Support/ManagedStatic.h
+++ b/include/llvm/Support/ManagedStatic.h
@@ -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;
};