1//===-- llvm-mc.cpp - Machine Code Hacking Driver -------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
--- 395 unchanged lines hidden (view full) ---
404
405 if (FileType == OFT_AssemblyFile) {
406 MCInstPrinter *IP =
407 TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *MCII, *MRI, *STI);
408 MCCodeEmitter *CE = 0;
409 MCAsmBackend *MAB = 0;
410 if (ShowEncoding) {
411 CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
412 MAB = TheTarget->createMCAsmBackend(TripleName);
413 }
414 Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true,
415 /*useLoc*/ true,
416 /*useCFI*/ true,
417 /*useDwarfDirectory*/ true,
418 IP, CE, MAB, ShowInst));
419
420 } else if (FileType == OFT_Null) {
421 Str.reset(createNullStreamer(Ctx));
422 } else {
423 assert(FileType == OFT_ObjectFile && "Invalid file type!");
424 MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
425 MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName);
426 Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB,
427 FOS, CE, RelaxAll,
428 NoExecStack));
429 }
430
431 int Res = 1;
432 switch (Action) {
433 case AC_AsLex:
--- 18 unchanged lines hidden ---
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
--- 395 unchanged lines hidden (view full) ---
404
405 if (FileType == OFT_AssemblyFile) {
406 MCInstPrinter *IP =
407 TheTarget->createMCInstPrinter(OutputAsmVariant, *MAI, *MCII, *MRI, *STI);
408 MCCodeEmitter *CE = 0;
409 MCAsmBackend *MAB = 0;
410 if (ShowEncoding) {
411 CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
412 MAB = TheTarget->createMCAsmBackend(TripleName);
413 }
414 Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true,
415 /*useLoc*/ true,
416 /*useCFI*/ true,
417 /*useDwarfDirectory*/ true,
418 IP, CE, MAB, ShowInst));
419
420 } else if (FileType == OFT_Null) {
421 Str.reset(createNullStreamer(Ctx));
422 } else {
423 assert(FileType == OFT_ObjectFile && "Invalid file type!");
424 MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx);
425 MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName);
426 Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB,
427 FOS, CE, RelaxAll,
428 NoExecStack));
429 }
430
431 int Res = 1;
432 switch (Action) {
433 case AC_AsLex:
--- 18 unchanged lines hidden ---