• Home
  • Raw
  • Download

Lines Matching +full:opt +full:- +full:out

1 //===-- llvm-mc.cpp - Machine Code Hacking Driver ---------------*- C++ -*-===//
8 //===----------------------------------------------------------------------===//
13 //===----------------------------------------------------------------------===//
45 static cl::opt<std::string>
46 InputFilename(cl::Positional, cl::desc("<input file>"), cl::init("-"));
48 static cl::opt<std::string>
52 static cl::opt<bool>
53 ShowEncoding("show-encoding", cl::desc("Show instruction encodings"));
55 static cl::opt<bool> RelaxELFRel(
56 "relax-relocations", cl::init(true),
59 static cl::opt<DebugCompressionType>
60 CompressDebugSections("compress-debug-sections", cl::ValueOptional,
68 clEnumValN(DebugCompressionType::DCT_ZlibGnu, "zlib-gnu",
69 "Use zlib-gnu compression (depricated)"),
72 static cl::opt<bool>
73 ShowInst("show-inst", cl::desc("Show internal instruction representation"));
75 static cl::opt<bool>
76 ShowInstOperands("show-inst-operands",
79 static cl::opt<unsigned>
80 OutputAsmVariant("output-asm-variant",
83 static cl::opt<bool>
84 PrintImmHex("print-imm-hex", cl::init(false),
90 static cl::opt<bool>
91 PreserveComments("preserve-comments",
99 static cl::opt<OutputFileType>
115 static cl::opt<std::string>
117 "see -version for available targets"));
119 static cl::opt<std::string>
121 "see -version for available targets"));
123 static cl::opt<std::string>
125 cl::desc("Target a specific cpu type (-mcpu=help for details)"),
126 cl::value_desc("cpu-name"),
132 cl::desc("Target specific attributes (-mattr=help for details)"),
133 cl::value_desc("a1,+a2,-a3,..."));
135 static cl::opt<bool> PIC("position-independent",
138 static cl::opt<llvm::CodeModel::Model>
139 CMModel("code-model",
154 static cl::opt<bool>
158 static cl::opt<bool>
162 static cl::opt<std::string>
163 DebugCompilationDir("fdebug-compilation-dir",
166 static cl::opt<std::string>
167 MainFileName("main-file-name",
170 static cl::opt<bool> SaveTempLabels("save-temp-labels",
173 static cl::opt<bool> NoExecStack("no-exec-stack",
183 static cl::opt<ActionType>
186 cl::values(clEnumValN(AC_AsLex, "as-lex",
197 // Figure out the target triple. in GetTarget()
218 OutputFilename = "-"; in GetOutputStream()
221 auto Out = llvm::make_unique<tool_output_file>(OutputFilename, EC, in GetOutputStream() local
228 return Out; in GetOutputStream()
253 Lexer.setBuffer(SrcMgr.getMemoryBuffer(SrcMgr.getMainFileID())->getBuffer()); in AsLexInput()
355 TheTarget->createMCAsmParser(STI, *Parser, MCII, MCOptions)); in AssembleInput()
366 Parser->setShowParsedOperands(ShowInstOperands); in AssembleInput()
367 Parser->setTargetParser(*TAP); in AssembleInput()
369 int Res = Parser->Run(NoInitialTextSection); in AssembleInput()
375 // Print a stack trace if we signal out. in main()
386 // Register the target printer for --version. in main()
410 MemoryBuffer *Buffer = BufferPtr->get(); in main()
421 std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TripleName)); in main()
424 std::unique_ptr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(*MRI, TripleName)); in main()
427 MAI->setRelaxELFRelocations(RelaxELFRel); in main()
432 << ": build tools with zlib to enable -compress-debug-sections"; in main()
435 MAI->setCompressDebugSections(CompressDebugSections); in main()
437 MAI->setPreserveAsmComments(PreserveComments); in main()
481 std::unique_ptr<tool_output_file> Out = GetOutputStream(); in main() local
482 if (!Out) in main()
486 raw_pwrite_stream *OS = &Out->os(); in main()
489 std::unique_ptr<MCInstrInfo> MCII(TheTarget->createMCInstrInfo()); in main()
491 TheTarget->createMCSubtargetInfo(TripleName, MCPU, FeaturesStr)); in main()
495 IP = TheTarget->createMCInstPrinter(Triple(TripleName), OutputAsmVariant, in main()
499 IP->setPrintImmHex(PrintImmHex); in main()
505 CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); in main()
506 MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU); in main()
509 Str.reset(TheTarget->createAsmStreamer( in main()
514 Str.reset(TheTarget->createNullStreamer(Ctx)); in main()
521 if (!Out->os().supportsSeeking()) { in main()
522 BOS = make_unique<buffer_ostream>(Out->os()); in main()
526 MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); in main()
527 MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, MCPU); in main()
528 Str.reset(TheTarget->createMCObjectStreamer( in main()
533 Str->InitSections(true); in main()
540 Res = AsLexInput(SrcMgr, *MAI, Out->os()); in main()
548 IP->setUseMarkup(1); in main()
557 *Buffer, SrcMgr, Out->os()); in main()
560 if (Res == 0) Out->keep(); in main()