diff options
| author | Owen Anderson <resistor@mac.com> | 2010-10-07 18:50:11 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2010-10-07 18:50:11 +0000 |
| commit | e9d5d0736c50e1a5f3f2791010a540de0fd2058a (patch) | |
| tree | 29f63efd9d9bf7a0462ce2b7fbafdd65b21ec427 /llvm | |
| parent | 28f5dd85259a55572082164a328a6355f5c3a073 (diff) | |
| download | bcm5719-llvm-e9d5d0736c50e1a5f3f2791010a540de0fd2058a.tar.gz bcm5719-llvm-e9d5d0736c50e1a5f3f2791010a540de0fd2058a.zip | |
Add initialization routines for Target.
llvm-svn: 115957
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm-c/Initialization.h | 1 | ||||
| -rw-r--r-- | llvm/include/llvm/InitializePasses.h | 3 | ||||
| -rw-r--r-- | llvm/lib/Target/Target.cpp | 14 |
3 files changed, 16 insertions, 2 deletions
diff --git a/llvm/include/llvm-c/Initialization.h b/llvm/include/llvm-c/Initialization.h index 9a2f04c03e6..775af4fce1f 100644 --- a/llvm/include/llvm-c/Initialization.h +++ b/llvm/include/llvm-c/Initialization.h @@ -28,6 +28,7 @@ void LLVMInitializeIPO(LLVMPassRegistryRef R); void LLVMInitializeAnalysis(LLVMPassRegistryRef R); void LLVMInitializeIPA(LLVMPassRegistryRef R); void LLVMInitializeCodeGen(LLVMPassRegistryRef R); +void LLVMInitializeTarget(LLVMPassRegistryRef R); #ifdef __cplusplus } diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h index 1a1f2e09a7d..62d0574b9bc 100644 --- a/llvm/include/llvm/InitializePasses.h +++ b/llvm/include/llvm/InitializePasses.h @@ -39,6 +39,9 @@ void initializeIPA(PassRegistry&); /// initializeCodeGen - Initialize all passes linked into the CodeGen library. void initializeCodeGen(PassRegistry&); +/// initializeCodeGen - Initialize all passes linked into the CodeGen library. +void initializeTarget(PassRegistry&); + void initializeAAEvalPass(PassRegistry&); void initializeADCEPass(PassRegistry&); void initializeAliasAnalysisAnalysisGroup(PassRegistry&); diff --git a/llvm/lib/Target/Target.cpp b/llvm/lib/Target/Target.cpp index f5c969ae133..bae4bdf8e22 100644 --- a/llvm/lib/Target/Target.cpp +++ b/llvm/lib/Target/Target.cpp @@ -7,12 +7,14 @@ // //===----------------------------------------------------------------------===// // -// This file implements the C bindings for libLLVMTarget.a, which implements -// target information. +// This file implements the core infrastructure (including C bindings) for +// libLLVMTarget.a, which implements target information. // //===----------------------------------------------------------------------===// #include "llvm-c/Target.h" +#include "llvm-c/Initialization.h" +#include "llvm/InitializePasses.h" #include "llvm/PassManager.h" #include "llvm/Target/TargetData.h" #include "llvm/LLVMContext.h" @@ -20,6 +22,14 @@ using namespace llvm; +void llvm::initializeTarget(PassRegistry &Registry) { + initializeTargetDataPass(Registry); +} + +void LLVMInitializeTarget(LLVMPassRegistryRef R) { + initializeTarget(*unwrap(R)); +} + LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep) { return wrap(new TargetData(StringRep)); } |

