Add initialization routines for Target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115957 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2010-10-07 18:50:11 +00:00
parent 8456c4f957
commit 9966306aa7
3 changed files with 16 additions and 2 deletions

View File

@ -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
}

View File

@ -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&);

View File

@ -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));
}