[YAMLIO] Add support for numeric values in enums.
[oota-llvm.git] / include / llvm / Support / CrashRecoveryContext.h
index c132373e91d24e77f9a19bfb017d970c53abfc51..1f3965c8ade4a8e188b3fb782a87a594845397fd 100644 (file)
@@ -10,9 +10,8 @@
 #ifndef LLVM_SUPPORT_CRASHRECOVERYCONTEXT_H
 #define LLVM_SUPPORT_CRASHRECOVERYCONTEXT_H
 
-#include <string>
-
 #include "llvm/ADT/STLExtras.h"
+#include <string>
 
 namespace llvm {
 class StringRef;
@@ -87,6 +86,9 @@ public:
   /// requested stack size).
   ///
   /// See RunSafely() and llvm_execute_on_thread().
+  ///
+  /// On Darwin, if PRIO_DARWIN_BG is set on the calling thread, it will be
+  /// propagated to the new thread as well.
   bool RunSafelyOnThread(function_ref<void()>, unsigned RequestedStackSize = 0);
   bool RunSafelyOnThread(void (*Fn)(void*), void *UserData,
                          unsigned RequestedStackSize = 0) {
@@ -163,9 +165,7 @@ public:
     : CrashRecoveryContextCleanupBase<
         CrashRecoveryContextDeleteCleanup<T>, T>(context, resource) {}
 
-  virtual void recoverResources() {
-    delete this->resource;
-  }  
+  void recoverResources() override { delete this->resource; }
 };
 
 template <typename T>
@@ -178,9 +178,7 @@ public:
     : CrashRecoveryContextCleanupBase<CrashRecoveryContextReleaseRefCleanup<T>,
           T>(context, resource) {}
 
-  virtual void recoverResources() {
-    this->resource->Release();
-  }
+  void recoverResources() override { this->resource->Release(); }
 };
 
 template <typename T, typename Cleanup = CrashRecoveryContextDeleteCleanup<T> >