[llvm-commits] [llvm] r98220 - in /llvm/trunk: include/llvm/Target/TargetRegistry.h lib/Target/X86/X86.h lib/Target/X86/X86AsmBackend.cpp
Daniel Dunbar
daniel at zuster.org
Wed Mar 10 17:34:16 PST 2010
Author: ddunbar
Date: Wed Mar 10 19:34:16 2010
New Revision: 98220
URL: http://llvm.org/viewvc/llvm-project?rev=98220&view=rev
Log:
MC: Provide the target triple to AsmBackend constructors.
Modified:
llvm/trunk/include/llvm/Target/TargetRegistry.h
llvm/trunk/lib/Target/X86/X86.h
llvm/trunk/lib/Target/X86/X86AsmBackend.cpp
Modified: llvm/trunk/include/llvm/Target/TargetRegistry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegistry.h?rev=98220&r1=98219&r2=98220&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetRegistry.h (original)
+++ llvm/trunk/include/llvm/Target/TargetRegistry.h Wed Mar 10 19:34:16 2010
@@ -66,7 +66,7 @@
MCStreamer &Streamer,
const MCAsmInfo *MAI);
typedef TargetAsmBackend *(*AsmBackendCtorTy)(const Target &T,
- MCAssembler &A);
+ const std::string &TT);
typedef TargetAsmLexer *(*AsmLexerCtorTy)(const Target &T,
const MCAsmInfo &MAI);
typedef TargetAsmParser *(*AsmParserCtorTy)(const Target &T,MCAsmParser &P);
@@ -208,11 +208,12 @@
/// createAsmBackend - Create a target specific assembly parser.
///
+ /// \arg Triple - The target triple string.
/// \arg Backend - The target independent assembler object.
- TargetAsmBackend *createAsmBackend(MCAssembler &Backend) const {
+ TargetAsmBackend *createAsmBackend(const std::string &Triple) const {
if (!AsmBackendCtorFn)
return 0;
- return AsmBackendCtorFn(*this, Backend);
+ return AsmBackendCtorFn(*this, Triple);
}
/// createAsmLexer - Create a target specific assembly lexer.
Modified: llvm/trunk/lib/Target/X86/X86.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.h?rev=98220&r1=98219&r2=98220&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86.h (original)
+++ llvm/trunk/lib/Target/X86/X86.h Wed Mar 10 19:34:16 2010
@@ -21,7 +21,6 @@
class FunctionPass;
class JITCodeEmitter;
-class MCAssembler;
class MCCodeEmitter;
class MCContext;
class MachineCodeEmitter;
@@ -57,8 +56,8 @@
MCCodeEmitter *createX86_64MCCodeEmitter(const Target &, TargetMachine &TM,
MCContext &Ctx);
-TargetAsmBackend *createX86_32AsmBackend(const Target &, MCAssembler &);
-TargetAsmBackend *createX86_64AsmBackend(const Target &, MCAssembler &);
+TargetAsmBackend *createX86_32AsmBackend(const Target &, const std::string &);
+TargetAsmBackend *createX86_64AsmBackend(const Target &, const std::string &);
/// createX86EmitCodeToMemory - Returns a pass that converts a register
/// allocated function into raw machine code in a dynamically
Modified: llvm/trunk/lib/Target/X86/X86AsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmBackend.cpp?rev=98220&r1=98219&r2=98220&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86AsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86AsmBackend.cpp Wed Mar 10 19:34:16 2010
@@ -17,18 +17,18 @@
class X86AsmBackend : public TargetAsmBackend {
public:
- X86AsmBackend(const Target &T, MCAssembler &A)
+ X86AsmBackend(const Target &T)
: TargetAsmBackend(T) {}
};
}
TargetAsmBackend *llvm::createX86_32AsmBackend(const Target &T,
- MCAssembler &A) {
- return new X86AsmBackend(T, A);
+ const std::string &TT) {
+ return new X86AsmBackend(T);
}
TargetAsmBackend *llvm::createX86_64AsmBackend(const Target &T,
- MCAssembler &A) {
- return new X86AsmBackend(T, A);
+ const std::string &TT) {
+ return new X86AsmBackend(T);
}
More information about the llvm-commits
mailing list