aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetRegistry.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-14 23:50:31 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-14 23:50:31 +0000
commit1abf2cb59b8d63415780a03329307c0997b2670c (patch)
tree40bd0acf3a26bd3417cfc81af3ef5f22631d7903 /include/llvm/Target/TargetRegistry.h
parente696436a7ef32d892e3f76f38e84146dacc232b5 (diff)
downloadexternal_llvm-1abf2cb59b8d63415780a03329307c0997b2670c.tar.gz
external_llvm-1abf2cb59b8d63415780a03329307c0997b2670c.tar.bz2
external_llvm-1abf2cb59b8d63415780a03329307c0997b2670c.zip
Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetRegistry.h')
-rw-r--r--include/llvm/Target/TargetRegistry.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/llvm/Target/TargetRegistry.h b/include/llvm/Target/TargetRegistry.h
index 671000554c..7e0ce19f8f 100644
--- a/include/llvm/Target/TargetRegistry.h
+++ b/include/llvm/Target/TargetRegistry.h
@@ -66,8 +66,8 @@ namespace llvm {
typedef unsigned (*TripleMatchQualityFnTy)(const std::string &TT);
- typedef MCAsmInfo *(*AsmInfoCtorFnTy)(const Target &T,
- StringRef TT);
+ typedef MCAsmInfo *(*MCAsmInfoCtorFnTy)(const Target &T,
+ StringRef TT);
typedef MCInstrInfo *(*MCInstrInfoCtorFnTy)(void);
typedef MCRegisterInfo *(*MCRegInfoCtorFnTy)(void);
typedef MCSubtargetInfo *(*MCSubtargetInfoCtorFnTy)(StringRef TT,
@@ -128,9 +128,9 @@ namespace llvm {
/// HasJIT - Whether this target supports the JIT.
bool HasJIT;
- /// AsmInfoCtorFn - Constructor function for this target's MCAsmInfo, if
+ /// MCAsmInfoCtorFn - Constructor function for this target's MCAsmInfo, if
/// registered.
- AsmInfoCtorFnTy AsmInfoCtorFn;
+ MCAsmInfoCtorFnTy MCAsmInfoCtorFn;
/// MCInstrInfoCtorFn - Constructor function for this target's MCInstrInfo,
/// if registered.
@@ -240,17 +240,17 @@ namespace llvm {
/// @name Feature Constructors
/// @{
- /// createAsmInfo - Create a MCAsmInfo implementation for the specified
+ /// createMCAsmInfo - Create a MCAsmInfo implementation for the specified
/// target triple.
///
/// \arg Triple - This argument is used to determine the target machine
/// feature set; it should always be provided. Generally this should be
/// either the target triple from the module, or the target triple of the
/// host if that does not exist.
- MCAsmInfo *createAsmInfo(StringRef Triple) const {
- if (!AsmInfoCtorFn)
+ MCAsmInfo *createMCAsmInfo(StringRef Triple) const {
+ if (!MCAsmInfoCtorFn)
return 0;
- return AsmInfoCtorFn(*this, Triple);
+ return MCAsmInfoCtorFn(*this, Triple);
}
/// createMCInstrInfo - Create a MCInstrInfo implementation.
@@ -485,7 +485,7 @@ namespace llvm {
Target::TripleMatchQualityFnTy TQualityFn,
bool HasJIT = false);
- /// RegisterAsmInfo - Register a MCAsmInfo implementation for the
+ /// RegisterMCAsmInfo - Register a MCAsmInfo implementation for the
/// given target.
///
/// Clients are responsible for ensuring that registration doesn't occur
@@ -494,10 +494,10 @@ namespace llvm {
///
/// @param T - The target being registered.
/// @param Fn - A function to construct a MCAsmInfo for the target.
- static void RegisterAsmInfo(Target &T, Target::AsmInfoCtorFnTy Fn) {
+ static void RegisterMCAsmInfo(Target &T, Target::MCAsmInfoCtorFnTy Fn) {
// Ignore duplicate registration.
- if (!T.AsmInfoCtorFn)
- T.AsmInfoCtorFn = Fn;
+ if (!T.MCAsmInfoCtorFn)
+ T.MCAsmInfoCtorFn = Fn;
}
/// RegisterMCInstrInfo - Register a MCInstrInfo implementation for the
@@ -722,18 +722,18 @@ namespace llvm {
}
};
- /// RegisterAsmInfo - Helper template for registering a target assembly info
+ /// RegisterMCAsmInfo - Helper template for registering a target assembly info
/// implementation. This invokes the static "Create" method on the class to
/// actually do the construction. Usage:
///
/// extern "C" void LLVMInitializeFooTarget() {
/// extern Target TheFooTarget;
- /// RegisterAsmInfo<FooMCAsmInfo> X(TheFooTarget);
+ /// RegisterMCAsmInfo<FooMCAsmInfo> X(TheFooTarget);
/// }
template<class MCAsmInfoImpl>
- struct RegisterAsmInfo {
- RegisterAsmInfo(Target &T) {
- TargetRegistry::RegisterAsmInfo(T, &Allocator);
+ struct RegisterMCAsmInfo {
+ RegisterMCAsmInfo(Target &T) {
+ TargetRegistry::RegisterMCAsmInfo(T, &Allocator);
}
private:
static MCAsmInfo *Allocator(const Target &T, StringRef TT) {
@@ -742,17 +742,17 @@ namespace llvm {
};
- /// RegisterAsmInfoFn - Helper template for registering a target assembly info
+ /// RegisterMCAsmInfoFn - Helper template for registering a target assembly info
/// implementation. This invokes the specified function to do the
/// construction. Usage:
///
/// extern "C" void LLVMInitializeFooTarget() {
/// extern Target TheFooTarget;
- /// RegisterAsmInfoFn X(TheFooTarget, TheFunction);
+ /// RegisterMCAsmInfoFn X(TheFooTarget, TheFunction);
/// }
- struct RegisterAsmInfoFn {
- RegisterAsmInfoFn(Target &T, Target::AsmInfoCtorFnTy Fn) {
- TargetRegistry::RegisterAsmInfo(T, Fn);
+ struct RegisterMCAsmInfoFn {
+ RegisterMCAsmInfoFn(Target &T, Target::MCAsmInfoCtorFnTy Fn) {
+ TargetRegistry::RegisterMCAsmInfo(T, Fn);
}
};