aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm-c/Initialization.h1
-rw-r--r--include/llvm/InitializePasses.h4
-rw-r--r--lib/VMCore/Core.cpp16
3 files changed, 19 insertions, 2 deletions
diff --git a/include/llvm-c/Initialization.h b/include/llvm-c/Initialization.h
index 775af4fce1..01dbeb6cdf 100644
--- a/include/llvm-c/Initialization.h
+++ b/include/llvm-c/Initialization.h
@@ -22,6 +22,7 @@
extern "C" {
#endif
+void LLVMInitializeCore(LLVMPassRegistryRef R);
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R);
void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
void LLVMInitializeIPO(LLVMPassRegistryRef R);
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h
index 62d0574b9b..3735199776 100644
--- a/include/llvm/InitializePasses.h
+++ b/include/llvm/InitializePasses.h
@@ -19,6 +19,10 @@ namespace llvm {
class PassRegistry;
+/// initializeCore - Initialize all passes linked into the
+/// TransformUtils library.
+void initializeCore(PassRegistry&);
+
/// initializeTransformUtils - Initialize all passes linked into the
/// TransformUtils library.
void initializeTransformUtils(PassRegistry&);
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index 2b1469341a..c5940d3423 100644
--- a/lib/VMCore/Core.cpp
+++ b/lib/VMCore/Core.cpp
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-// This file implements the C bindings for libLLVMCore.a, which implements
-// the LLVM intermediate representation.
+// This file implements the common infrastructure (including the C bindings)
+// for libLLVMCore.a, which implements the LLVM intermediate representation.
//
//===----------------------------------------------------------------------===//
@@ -34,6 +34,18 @@
using namespace llvm;
+void llvm::initializeCore(PassRegistry &Registry) {
+ initializeDominatorTreePass(Registry);
+ initializeDominanceFrontierPass(Registry);
+ initializePrintModulePassPass(Registry);
+ initializePrintFunctionPassPass(Registry);
+ initializeVerifierPass(Registry);
+ initializePreVerifierPass(Registry);
+}
+
+void LLVMInitializeCore(LLVMPassRegistryRef R) {
+ initializeCore(*unwrap(R));
+}
/*===-- Error handling ----------------------------------------------------===*/