aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/ManagedStatic.h
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2009-02-20 22:51:36 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2009-02-20 22:51:36 +0000
commitfe2cce63aa26d0916fa7be32c6bf7fa8fb059ee7 (patch)
tree0b78d06b18ccfef4e1aad7bbbf9b7f02fb90eb3c /include/llvm/Support/ManagedStatic.h
parentd5ece81cc7a908c30e6786b70a4a9db1dd129a8a (diff)
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ManagedStatic.h')
-rw-r--r--include/llvm/Support/ManagedStatic.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Support/ManagedStatic.h b/include/llvm/Support/ManagedStatic.h
index 28b25dbb62..d0298e495d 100644
--- a/include/llvm/Support/ManagedStatic.h
+++ b/include/llvm/Support/ManagedStatic.h
@@ -31,12 +31,12 @@ protected:
mutable void *Ptr;
mutable void (*DeleterFn)(void*);
mutable const ManagedStaticBase *Next;
-
+
void RegisterManagedStatic(void *ObjPtr, void (*deleter)(void*)) const;
public:
- /// isConstructed - Return true if this object has not been created yet.
+ /// isConstructed - Return true if this object has not been created yet.
bool isConstructed() const { return Ptr != 0; }
-
+
void destroy() const;
};
@@ -48,7 +48,7 @@ public:
template<class C>
class ManagedStatic : public ManagedStaticBase {
public:
-
+
// Accessors.
C &operator*() {
if (!Ptr) LazyInit();
@@ -66,7 +66,7 @@ public:
if (!Ptr) LazyInit();
return static_cast<C*>(Ptr);
}
-
+
public:
void LazyInit() const {
RegisterManagedStatic(new C(), object_deleter<C>);
@@ -83,14 +83,14 @@ public:
/// llvm_shutdown - Deallocate and destroy all ManagedStatic variables.
void llvm_shutdown();
-
+
/// llvm_shutdown_obj - This is a simple helper class that calls
/// llvm_shutdown() when it is destroyed.
struct llvm_shutdown_obj {
llvm_shutdown_obj() {}
~llvm_shutdown_obj() { llvm_shutdown(); }
};
-
+
}
#endif