summaryrefslogtreecommitdiff
path: root/include/llvm-c/Core.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-10-07 17:55:47 +0000
committerOwen Anderson <resistor@mac.com>2010-10-07 17:55:47 +0000
commit1a3d23362168ae6d8e07efd547a92cc36738a789 (patch)
treec51c1f2450e0c73fa949adceb67222e2a6cce049 /include/llvm-c/Core.h
parent745c872bb5a81edafd1c279267bc89e96b7c8d1e (diff)
downloadllvm-1a3d23362168ae6d8e07efd547a92cc36738a789.tar.gz
llvm-1a3d23362168ae6d8e07efd547a92cc36738a789.tar.bz2
llvm-1a3d23362168ae6d8e07efd547a92cc36738a789.tar.xz
Next step on the getting-rid-of-static-ctors train: begin adding per-library
initialization functions that initialize the set of passes implemented in that library. Add C bindings for these functions as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c/Core.h')
-rw-r--r--include/llvm-c/Core.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index 148bc72341..d0fe536d5c 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -40,6 +40,7 @@
/* Need these includes to support the LLVM 'cast' template for the C++ 'wrap'
and 'unwrap' conversion functions. */
#include "llvm/Module.h"
+#include "llvm/PassRegistry.h"
#include "llvm/Support/IRBuilder.h"
extern "C" {
@@ -92,6 +93,9 @@ typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef;
/** See the llvm::PassManagerBase class. */
typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
+/** See the llvm::PassRegistry class. */
+typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef;
+
/** Used to get the users and usees of a Value. See the llvm::Use class. */
typedef struct LLVMOpaqueUse *LLVMUseRef;
@@ -1016,6 +1020,11 @@ LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf,
char **OutMessage);
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf);
+/*===-- Pass Registry -----------------------------------------------------===*/
+
+/** Return the global pass registry, for use with initialization functions.
+ See llvm::PassRegistry::getPassRegistry. */
+LLVMPassRegistryRef LLVMGetGlobalPassRegistry(void);
/*===-- Pass Managers -----------------------------------------------------===*/
@@ -1104,6 +1113,7 @@ namespace llvm {
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext, LLVMContextRef )
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseRef )
DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBase, LLVMPassManagerRef )
+ DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassRegistry, LLVMPassRegistryRef )
/* LLVMModuleProviderRef exists for historical reasons, but now just holds a
* Module.
*/