diff options
author | Owen Anderson <resistor@mac.com> | 2010-10-07 19:51:21 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-10-07 19:51:21 +0000 |
commit | b8a1ccfc4b2eb84cc59465e2109019c9f85c9114 (patch) | |
tree | 524b77464a73da4a024b6c4c210f2d2459bf230d | |
parent | a71b4ba3c8514c77c67ce37b7e0e17a28c763f31 (diff) | |
download | llvm-b8a1ccfc4b2eb84cc59465e2109019c9f85c9114.tar.gz llvm-b8a1ccfc4b2eb84cc59465e2109019c9f85c9114.tar.bz2 llvm-b8a1ccfc4b2eb84cc59465e2109019c9f85c9114.tar.xz |
Add initialization routines for VMCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115963 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm-c/Initialization.h | 1 | ||||
-rw-r--r-- | include/llvm/InitializePasses.h | 4 | ||||
-rw-r--r-- | lib/VMCore/Core.cpp | 16 |
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 ----------------------------------------------------===*/ |