[cfe-commits] r109766 - /cfe/trunk/tools/driver/cc1as_main.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Jul 29 10:48:03 PDT 2010
Author: d0k
Date: Thu Jul 29 12:48:03 2010
New Revision: 109766
URL: http://llvm.org/viewvc/llvm-project?rev=109766&view=rev
Log:
Prepare for upcoming ownership change.
Modified:
cfe/trunk/tools/driver/cc1as_main.cpp
Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=109766&r1=109765&r2=109766&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Thu Jul 29 12:48:03 2010
@@ -254,26 +254,25 @@
return false;
}
- OwningPtr<MCCodeEmitter> CE;
OwningPtr<MCStreamer> Str;
- OwningPtr<TargetAsmBackend> TAB;
if (Opts.OutputType == AssemblerInvocation::FT_Asm) {
MCInstPrinter *IP =
TheTarget->createMCInstPrinter(Opts.OutputAsmVariant, *MAI);
+ MCCodeEmitter *CE = 0;
if (Opts.ShowEncoding)
- CE.reset(TheTarget->createCodeEmitter(*TM, Ctx));
+ CE = TheTarget->createCodeEmitter(*TM, Ctx);
Str.reset(createAsmStreamer(Ctx, *Out,TM->getTargetData()->isLittleEndian(),
- /*asmverbose*/true, IP, CE.get(),
- Opts.ShowInst));
+ /*asmverbose*/true, IP, CE, Opts.ShowInst));
} else if (Opts.OutputType == AssemblerInvocation::FT_Null) {
Str.reset(createNullStreamer(Ctx));
} else {
assert(Opts.OutputType == AssemblerInvocation::FT_Obj &&
"Invalid file type!");
- CE.reset(TheTarget->createCodeEmitter(*TM, Ctx));
- TAB.reset(TheTarget->createAsmBackend(Opts.Triple));
- Str.reset(createMachOStreamer(Ctx, *TAB, *Out, CE.get(), Opts.RelaxAll));
+ MCCodeEmitter *CE = TheTarget->createCodeEmitter(*TM, Ctx);
+ TargetAsmBackend *TAB = TheTarget->createAsmBackend(Opts.Triple);
+ Str.reset(TheTarget->createObjectStreamer(Opts.Triple, Ctx, *TAB, *Out,
+ CE, Opts.RelaxAll));
}
OwningPtr<MCAsmParser> Parser(createMCAsmParser(*TheTarget, SrcMgr, Ctx,
More information about the cfe-commits
mailing list