[llvm-commits] [llvm] r115963 - in /llvm/trunk: include/llvm-c/Initialization.h include/llvm/InitializePasses.h lib/VMCore/Core.cpp

Owen Anderson resistor at mac.com
Thu Oct 7 12:51:21 PDT 2010


Author: resistor
Date: Thu Oct  7 14:51:21 2010
New Revision: 115963

URL: http://llvm.org/viewvc/llvm-project?rev=115963&view=rev
Log:
Add initialization routines for VMCore.

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

Modified: llvm/trunk/include/llvm-c/Initialization.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Initialization.h?rev=115963&r1=115962&r2=115963&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Initialization.h (original)
+++ llvm/trunk/include/llvm-c/Initialization.h Thu Oct  7 14:51:21 2010
@@ -22,6 +22,7 @@
 extern "C" {
 #endif
 
+void LLVMInitializeCore(LLVMPassRegistryRef R);
 void LLVMInitializeTransformUtils(LLVMPassRegistryRef R);
 void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
 void LLVMInitializeIPO(LLVMPassRegistryRef R);

Modified: llvm/trunk/include/llvm/InitializePasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=115963&r1=115962&r2=115963&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InitializePasses.h (original)
+++ llvm/trunk/include/llvm/InitializePasses.h Thu Oct  7 14:51:21 2010
@@ -19,6 +19,10 @@
 
 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&);

Modified: llvm/trunk/lib/VMCore/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=115963&r1=115962&r2=115963&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Core.cpp (original)
+++ llvm/trunk/lib/VMCore/Core.cpp Thu Oct  7 14:51:21 2010
@@ -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 ----------------------------------------------------===*/
 





More information about the llvm-commits mailing list