Add initialization routines for VMCore.
authorOwen Anderson <resistor@mac.com>
Thu, 7 Oct 2010 19:51:21 +0000 (19:51 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 7 Oct 2010 19:51:21 +0000 (19:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115963 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm-c/Initialization.h
include/llvm/InitializePasses.h
lib/VMCore/Core.cpp

index 775af4fce1fed4c06f2b6fc23ec3eb1f8ae9ccfd..01dbeb6cdf71f51e9b9d52e0ed214dd6baca20f1 100644 (file)
@@ -22,6 +22,7 @@
 extern "C" {
 #endif
 
+void LLVMInitializeCore(LLVMPassRegistryRef R);
 void LLVMInitializeTransformUtils(LLVMPassRegistryRef R);
 void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
 void LLVMInitializeIPO(LLVMPassRegistryRef R);
index 62d0574b9bc7cb781fb0dfcd1acbe31c7cef78eb..3735199776124c30725349db8408233e1332b72d 100644 (file)
@@ -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&);
index 2b1469341af686ae8f94b49cf70ee5e58b0e117c..c5940d3423f9182b02038bb8cd729baedad0a010 100644 (file)
@@ -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.
 //
 //===----------------------------------------------------------------------===//
 
 
 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 ----------------------------------------------------===*/