Revert "Remove support for runtime multi-threading."
[oota-llvm.git] / include / llvm-c / Core.h
index cd9263d49142d497959bb7d9c9239e5cec3782dc..0e78ed71fa9afaf7593a2205c0db3fdc993a2af4 100644 (file)
@@ -112,23 +112,12 @@ typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
  */
 typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef;
 
-/** @see llvm::Pass */
-typedef struct LLVMOpaquePass *LLVMPassRef;
-
 /** @see llvm::PassManagerBase */
 typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
 
 /** @see llvm::PassRegistry */
 typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef;
 
-/** @see llvm::PassRunListener */
-typedef struct LLVMOpaquePassRunListener *LLVMPassRunListenerRef;
-
-/** @see llvm::LLVMPassRunListener */
-typedef void (*LLVMPassRunListenerHandlerTy)(LLVMContextRef, LLVMPassRef,
-                                             LLVMModuleRef, LLVMValueRef,
-                                             LLVMBasicBlockRef);
-
 /**
  * Used to get the users and usees of a Value.
  *
@@ -176,7 +165,9 @@ typedef enum {
     LLVMStackProtectStrongAttribute = 1ULL<<33,
     LLVMCold = 1ULL << 34,
     LLVMOptimizeNone = 1ULL << 35,
-    LLVMInAllocaAttribute = 1ULL << 36
+    LLVMInAllocaAttribute = 1ULL << 36,
+    LLVMNonNullAttribute = 1ULL << 37,
+    LLVMJumpTableAttribute = 1ULL << 38,
     */
 } LLVMAttribute;
 
@@ -478,6 +469,7 @@ void LLVMEnablePrettyStackTrace(void);
  */
 
 typedef void (*LLVMDiagnosticHandler)(LLVMDiagnosticInfoRef, void *);
+typedef void (*LLVMYieldCallback)(LLVMContextRef, void *);
 
 /**
  * Create a new context.
@@ -499,6 +491,14 @@ void LLVMContextSetDiagnosticHandler(LLVMContextRef C,
                                      LLVMDiagnosticHandler Handler,
                                      void *DiagnosticContext);
 
+/**
+ * Set the yield callback function for this context.
+ *
+ * @see LLVMContext::setYieldCallback()
+ */
+void LLVMContextSetYieldCallback(LLVMContextRef C, LLVMYieldCallback Callback,
+                                 void *OpaqueHandle);
+
 /**
  * Destroy a context instance.
  *
@@ -526,10 +526,6 @@ unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char* Name,
                                   unsigned SLen);
 unsigned LLVMGetMDKindID(const char* Name, unsigned SLen);
 
-LLVMPassRunListenerRef LLVMAddPassRunListener(LLVMContextRef,
-                                              LLVMPassRunListenerHandlerTy);
-void LLVMRemovePassRunListener(LLVMContextRef, LLVMPassRunListenerRef);
-
 /**
  * @}
  */
@@ -2775,18 +2771,6 @@ const char *LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf);
 size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf);
 void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf);
 
-/**
- * @}
- */
-
-/**
- * @defgroup LLVMCCorePass Pass
- *
- * @{
- */
-
-const char *LLVMGetPassName(LLVMPassRef);
-
 /**
  * @}
  */