[llvm-commits] [llvm] r115957 - in /llvm/trunk: include/llvm-c/Initialization.h include/llvm/InitializePasses.h lib/Target/Target.cpp
Owen Anderson
resistor at mac.com
Thu Oct 7 11:50:12 PDT 2010
Author: resistor
Date: Thu Oct 7 13:50:11 2010
New Revision: 115957
URL: http://llvm.org/viewvc/llvm-project?rev=115957&view=rev
Log:
Add initialization routines for Target.
Modified:
llvm/trunk/include/llvm-c/Initialization.h
llvm/trunk/include/llvm/InitializePasses.h
llvm/trunk/lib/Target/Target.cpp
Modified: llvm/trunk/include/llvm-c/Initialization.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Initialization.h?rev=115957&r1=115956&r2=115957&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Initialization.h (original)
+++ llvm/trunk/include/llvm-c/Initialization.h Thu Oct 7 13:50:11 2010
@@ -28,6 +28,7 @@
void LLVMInitializeAnalysis(LLVMPassRegistryRef R);
void LLVMInitializeIPA(LLVMPassRegistryRef R);
void LLVMInitializeCodeGen(LLVMPassRegistryRef R);
+void LLVMInitializeTarget(LLVMPassRegistryRef R);
#ifdef __cplusplus
}
Modified: llvm/trunk/include/llvm/InitializePasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=115957&r1=115956&r2=115957&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InitializePasses.h (original)
+++ llvm/trunk/include/llvm/InitializePasses.h Thu Oct 7 13:50:11 2010
@@ -39,6 +39,9 @@
/// 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&);
Modified: llvm/trunk/lib/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Target.cpp?rev=115957&r1=115956&r2=115957&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Target.cpp (original)
+++ llvm/trunk/lib/Target/Target.cpp Thu Oct 7 13:50:11 2010
@@ -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));
}
More information about the llvm-commits
mailing list