mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
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
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user