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 | 9966306aa7eab65d160df88b36ab13cd15dbecdb (patch) | |
tree | bdc35216c346bb93706475c99f4fc42d9d046287 /lib | |
parent | 8456c4f957e33887f3ab5a23bcf3e6d5cb4884a7 (diff) |
Add initialization routines for Target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/Target.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Target/Target.cpp b/lib/Target/Target.cpp index f5c969ae13..bae4bdf8e2 100644 --- a/lib/Target/Target.cpp +++ b/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)); } |