Lines Matching refs:Opts

165 static Error verifyOutput(const Options &Opts) {  in verifyOutput()  argument
166 if (Opts.OutputFileName == "-") { in verifyOutput()
171 std::string FileName = Opts.BuildSeparateDebugFile in verifyOutput()
172 ? Opts.getSeparateDebugFileName() in verifyOutput()
173 : Opts.OutputFileName; in verifyOutput()
180 verbose("Verifying DWARF...", Opts.Verbose); in verifyOutput()
183 if (!DICtx->verify(Opts.Verbose ? outs() : nulls(), in verifyOutput()
229 static Expected<uint32_t> saveSeparateDebugInfo(const Options &Opts, in saveSeparateDebugInfo() argument
232 std::string OutputFilename = Opts.getSeparateDebugFileName(); in saveSeparateDebugInfo()
233 Config.Common.InputFilename = Opts.InputFileName; in saveSeparateDebugInfo()
253 static Error saveNonDebugInfo(const Options &Opts, ObjectFile &InputFile, in saveNonDebugInfo() argument
256 Config.Common.InputFilename = Opts.InputFileName; in saveNonDebugInfo()
257 Config.Common.OutputFilename = Opts.OutputFileName; in saveNonDebugInfo()
259 std::string SeparateDebugFileName = Opts.getSeparateDebugFileName(); in saveNonDebugInfo()
276 static Error splitDebugIntoSeparateFile(const Options &Opts, in splitDebugIntoSeparateFile() argument
279 saveSeparateDebugInfo(Opts, InputFile); in splitDebugIntoSeparateFile()
284 saveNonDebugInfo(Opts, InputFile, *SeparateDebugFileCRC32OrErr)) in splitDebugIntoSeparateFile()
335 saveSeparateLinkedDebugInfo(const Options &Opts, ObjectFile &InputFile, in saveSeparateLinkedDebugInfo() argument
338 std::string OutputFilename = Opts.getSeparateDebugFileName(); in saveSeparateLinkedDebugInfo()
339 Config.Common.InputFilename = Opts.InputFileName; in saveSeparateLinkedDebugInfo()
365 static Error saveSingleLinkedDebugInfo(const Options &Opts, in saveSingleLinkedDebugInfo() argument
370 Config.Common.InputFilename = Opts.InputFileName; in saveSingleLinkedDebugInfo()
371 Config.Common.OutputFilename = Opts.OutputFileName; in saveSingleLinkedDebugInfo()
386 static Error saveLinkedDebugInfo(const Options &Opts, ObjectFile &InputFile, in saveLinkedDebugInfo() argument
388 if (Opts.BuildSeparateDebugFile) { in saveLinkedDebugInfo()
390 saveSeparateLinkedDebugInfo(Opts, InputFile, in saveLinkedDebugInfo()
396 saveNonDebugInfo(Opts, InputFile, *SeparateDebugFileCRC32OrErr)) in saveLinkedDebugInfo()
399 if (Error Err = saveSingleLinkedDebugInfo(Opts, InputFile, in saveLinkedDebugInfo()
407 static Error saveCopyOfFile(const Options &Opts, ObjectFile &InputFile) { in saveCopyOfFile() argument
410 Config.Common.InputFilename = Opts.InputFileName; in saveCopyOfFile()
411 Config.Common.OutputFilename = Opts.OutputFileName; in saveCopyOfFile()
422 static Error applyCLOptions(const struct Options &Opts, ObjectFile &InputFile) { in applyCLOptions() argument
423 if (Opts.DoGarbageCollection) { in applyCLOptions()
424 verbose("Do garbage collection for debug info ...", Opts.Verbose); in applyCLOptions()
429 if (Error Err = linkDebugInfo(InputFile, Opts, OutStream)) in applyCLOptions()
433 saveLinkedDebugInfo(Opts, InputFile, std::move(LinkedDebugInfo))) in applyCLOptions()
437 } else if (Opts.BuildSeparateDebugFile) { in applyCLOptions()
438 if (Error Err = splitDebugIntoSeparateFile(Opts, InputFile)) in applyCLOptions()
441 if (Error Err = saveCopyOfFile(Opts, InputFile)) in applyCLOptions()
476 Options Opts; in main() local
477 if (Error Err = validateAndSetOptions(Args, Opts)) in main()
487 MemoryBuffer::getFileOrSTDIN(Opts.InputFileName); in main()
489 error(createFileError(Opts.InputFileName, BuffOrErr.getError())); in main()
494 error(createFileError(Opts.InputFileName, BinOrErr.takeError())); in main()
497 FilePermissionsApplier::create(Opts.InputFileName); in main()
499 error(createFileError(Opts.InputFileName, PermsApplierOrErr.takeError())); in main()
502 error(createFileError(Opts.InputFileName, in main()
506 applyCLOptions(Opts, *static_cast<ObjectFile *>((*BinOrErr).get()))) in main()
507 error(createFileError(Opts.InputFileName, std::move(Err))); in main()
512 if (Error Err = PermsApplierOrErr->apply(Opts.OutputFileName)) in main()
515 if (Opts.BuildSeparateDebugFile) in main()
516 if (Error Err = PermsApplierOrErr->apply(Opts.getSeparateDebugFileName())) in main()
519 if (Opts.Verify) { in main()
520 if (Error Err = verifyOutput(Opts)) in main()