MC: Make TargetAsmBackend available to the AsmStreamer.

- Treaty talks on the non-proliferation of MC objects broke down.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2010-12-16 03:05:59 +00:00
parent 1d6547eb49
commit 745dacc91d
7 changed files with 34 additions and 13 deletions
+5
View File
@@ -426,6 +426,10 @@ namespace llvm {
/// \param CE - If given, a code emitter to use to show the instruction
/// encoding inline with the assembly. This method takes ownership of \arg CE.
///
/// \param TAB - If given, a target asm backend to use to show the fixup
/// information in conjunction with encoding information. This method takes
/// ownership of \arg TAB.
///
/// \param ShowInst - Whether to show the MCInst representation inline with
/// the assembly.
MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS,
@@ -433,6 +437,7 @@ namespace llvm {
bool useLoc,
MCInstPrinter *InstPrint = 0,
MCCodeEmitter *CE = 0,
TargetAsmBackend *TAB = 0,
bool ShowInst = false);
/// createMachOStreamer - Create a machine code streamer which will generate
+4 -1
View File
@@ -46,6 +46,7 @@ namespace llvm {
bool useLoc,
MCInstPrinter *InstPrint,
MCCodeEmitter *CE,
TargetAsmBackend *TAB,
bool ShowInst);
/// Target - Wrapper for Target specific information.
@@ -95,6 +96,7 @@ namespace llvm {
bool useLoc,
MCInstPrinter *InstPrint,
MCCodeEmitter *CE,
TargetAsmBackend *TAB,
bool ShowInst);
private:
@@ -323,10 +325,11 @@ namespace llvm {
bool useLoc,
MCInstPrinter *InstPrint,
MCCodeEmitter *CE,
TargetAsmBackend *TAB,
bool ShowInst) const {
// AsmStreamerCtorFn is default to llvm::createAsmStreamer
return AsmStreamerCtorFn(Ctx, OS, isVerboseAsm, useLoc,
InstPrint, CE, ShowInst);
InstPrint, CE, TAB, ShowInst);
}
/// @}