diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-27 00:51:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-27 00:51:57 +0000 |
commit | 4a0abd80f18f9c2a10bf5b14cd6731d51972a426 (patch) | |
tree | aa5e672bdfb25a08c7310a64502a34a753511554 /tools/llvm-mc | |
parent | 81e400092f55c2eba157172bfc0dd0df8317638d (diff) |
Sketch TargetRegistry support for MCCodeEmitter abstract interface.
- Of course, nothing actually can provide this interface yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80188 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index a9c7fe1939..c7f626c8ad 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/MCStreamer.h" #include "llvm/ADT/OwningPtr.h" @@ -235,6 +236,7 @@ static int AssembleInput(const char *ProgName) { } OwningPtr<AsmPrinter> AP; + OwningPtr<MCCodeEmitter> CE; OwningPtr<MCStreamer> Str; if (FileType == OFT_AssemblyFile) { @@ -242,7 +244,8 @@ static int AssembleInput(const char *ProgName) { assert(TAI && "Unable to create target asm info!"); AP.reset(TheTarget->createAsmPrinter(*Out, *TM, TAI, true)); - Str.reset(createAsmStreamer(Ctx, *Out, *TAI, AP.get())); + CE.reset(TheTarget->createCodeEmitter(*TM, TAI)); + Str.reset(createAsmStreamer(Ctx, *Out, *TAI, AP.get(), CE.get())); } else { assert(FileType == OFT_ObjectFile && "Invalid file type!"); Str.reset(createMachOStreamer(Ctx, *Out)); |