Lines Matching defs:arg

83   auto *arg = args.getLastArg(id);
84 if (!arg)
87 StringRef s = arg->getValue();
90 error(arg->getSpelling() + " expects 'old;new' format, but got " + s);
403 for (auto *arg : directives.args) {
404 switch (arg->getOption().getID()) {
406 parseAligncomm(arg->getValue());
409 parseAlternateName(arg->getValue());
412 if (std::optional<StringRef> path = findLibIfNew(arg->getValue()))
416 if (!arg->getValue()[0])
418 ctx.config.entry = addUndefined(mangle(arg->getValue()));
421 checkFailIfMismatch(arg->getValue(), file);
424 addUndefined(arg->getValue());
427 ctx.config.manifestDependencies.insert(arg->getValue());
430 parseMerge(arg->getValue());
433 ctx.config.noDefaultLibs.insert(findLib(arg->getValue()).lower());
439 parseSection(arg->getValue());
442 parseNumbers(arg->getValue(), &ctx.config.stackReserve,
447 parseSubsystem(arg->getValue(), &ctx.config.subsystem,
465 error(arg->getSpelling() + " is not allowed in .drectve (" +
801 for (auto *arg : args) {
802 switch (arg->getOption().getID()) {
814 os << arg->getSpelling() << quote(rewritePath(arg->getValue())) << '\n';
817 StringRef orderFile = arg->getValue();
819 os << arg->getSpelling() << '@' << quote(rewritePath(orderFile)) << '\n';
824 StringRef(arg->getValue()).split("=");
825 os << arg->getSpelling() << nameFile.first << '='
834 os << arg->getSpelling() << sys::path::filename(arg->getValue()) << "\n";
837 os << toString(*arg) << "\n";
888 auto *arg = args.getLastArg(os, osFile);
889 if (!arg)
891 if (arg->getOption().getID() == osFile.getID())
892 return arg->getValue();
894 assert(arg->getOption().getID() == os.getID());
1070 void LinkerDriver::parseOrderFile(StringRef arg) {
1073 if (!arg.starts_with("@")) {
1086 StringRef path = arg.substr(1);
1097 for (StringRef arg : args::getLines(mb->getMemBufferRef())) {
1098 std::string s(arg);
1104 warn("/order:" + arg + ": missing symbol: " + s + " [LNK4037]");
1339 for (auto *arg : args.filtered(OPT_wholearchive_file))
1340 if (std::optional<StringRef> path = findFile(arg->getValue()))
1343 for (auto *arg : args.filtered(OPT_exclude_symbols)) {
1345 StringRef(arg->getValue()).split(vec, ',');
1379 if (auto *arg = args.getLastArg(OPT_reproduce))
1380 return std::string(arg->getValue());
1382 if (auto *arg = args.getLastArg(OPT_linkrepro)) {
1383 SmallString<64> path = StringRef(arg->getValue());
1400 const opt::Arg *arg = args.getLastArg(OPT_vfsoverlay);
1401 if (!arg)
1404 auto bufOrErr = llvm::MemoryBuffer::getFile(arg->getValue());
1411 /*DiagHandler*/ nullptr, arg->getValue()))
1456 for (const auto *arg : args.filtered(OPT_mllvm)) {
1457 v.push_back(arg->getValue());
1458 config->mllvmOpts.emplace_back(arg->getValue());
1467 if (auto *arg = args.getLastArg(OPT_errorlimit)) {
1469 StringRef s = arg->getValue();
1471 error(arg->getSpelling() + " number expected, but got " + s);
1485 if (auto *arg = args.getLastArg(OPT_threads)) {
1486 StringRef v(arg->getValue());
1489 error(arg->getSpelling() + ": expected a positive integer, but got '" +
1490 arg->getValue() + "'");
1543 for (auto *arg : args.filtered(OPT_libpath))
1544 searchPaths.push_back(arg->getValue());
1563 for (auto *arg : args.filtered(OPT_ignore)) {
1565 StringRef(arg->getValue()).split(vec, ',');
1580 if (auto *arg = args.getLastArg(OPT_out))
1581 config->outputFile = arg->getValue();
1609 for (auto *arg : args.filtered(OPT_debug, OPT_debug_opt)) {
1611 if (arg->getOption().getID() == OPT_debug)
1614 str = StringRef(arg->getValue()).lower();
1676 if (auto *arg = args.getLastArg(OPT_pdb))
1677 config->pdbPath = arg->getValue();
1678 if (auto *arg = args.getLastArg(OPT_pdbaltpath))
1679 config->pdbAltPath = arg->getValue();
1680 if (auto *arg = args.getLastArg(OPT_pdbpagesize))
1681 parsePDBPageSize(arg->getValue());
1693 if (auto *arg = args.getLastArg(OPT_pdb_source_path))
1694 config->pdbSourcePath = arg->getValue();
1743 llvm::TimeTraceScope timeScope2("Machine arg");
1744 if (auto *arg = args.getLastArg(OPT_machine)) {
1745 config->machine = getMachineType(arg->getValue());
1747 fatal(Twine("unknown /machine argument: ") + arg->getValue());
1755 for (auto *arg : args.filtered(OPT_nodefaultlib))
1756 config->noDefaultLibs.insert(findLib(arg->getValue()).lower());
1764 if (auto *arg = args.getLastArg(OPT_base))
1765 parseNumbers(arg->getValue(), &config->imageBase);
1768 if (auto *arg = args.getLastArg(OPT_filealign)) {
1769 parseNumbers(arg->getValue(), &config->fileAlign);
1775 if (auto *arg = args.getLastArg(OPT_stack))
1776 parseNumbers(arg->getValue(), &config->stackReserve, &config->stackCommit);
1779 if (auto *arg = args.getLastArg(OPT_guard))
1780 parseGuard(arg->getValue());
1783 if (auto *arg = args.getLastArg(OPT_heap))
1784 parseNumbers(arg->getValue(), &config->heapReserve, &config->heapCommit);
1787 if (auto *arg = args.getLastArg(OPT_version))
1788 parseVersion(arg->getValue(), &config->majorImageVersion,
1792 if (auto *arg = args.getLastArg(OPT_subsystem))
1793 parseSubsystem(arg->getValue(), &config->subsystem,
1798 if (auto *arg = args.getLastArg(OPT_osversion)) {
1799 parseVersion(arg->getValue(), &config->majorOSVersion,
1807 if (llvm::opt::Arg *arg = args.getLastArg(OPT_timestamp, OPT_repro)) {
1808 if (arg->getOption().getID() == OPT_repro) {
1813 StringRef value(arg->getValue());
1832 for (auto *arg : args.filtered(OPT_alternatename))
1833 parseAlternateName(arg->getValue());
1836 for (auto *arg : args.filtered(OPT_incl))
1837 addUndefined(arg->getValue());
1840 if (auto *arg = args.getLastArg(OPT_implib))
1841 config->implib = arg->getValue();
1853 for (auto *arg : args.filtered(OPT_opt)) {
1854 std::string str = StringRef(arg->getValue()).lower();
1909 if (auto *arg = args.getLastArg(OPT_lldemit)) {
1910 StringRef s = arg->getValue();
1926 if (auto *arg = args.getLastArg(OPT_lldltocache))
1927 config->ltoCache = arg->getValue();
1930 if (auto *arg = args.getLastArg(OPT_lldltocachepolicy))
1932 parseCachePruningPolicy(arg->getValue()),
1933 Twine("/lldltocachepolicy: invalid cache policy: ") + arg->getValue());
1936 for (auto *arg : args.filtered(OPT_failifmismatch))
1937 checkFailIfMismatch(arg->getValue(), nullptr);
1940 for (auto *arg : args.filtered(OPT_merge))
1941 parseMerge(arg->getValue());
1962 for (auto *arg : args.filtered(OPT_section))
1963 parseSection(arg->getValue());
1966 if (auto *arg = args.getLastArg(OPT_align)) {
1967 parseNumbers(arg->getValue(), &config->align);
1969 error("/align: not a power of two: " + StringRef(arg->getValue()));
1975 for (auto *arg : args.filtered(OPT_aligncomm))
1976 parseAligncomm(arg->getValue());
1979 for (auto *arg : args.filtered(OPT_manifestdependency))
1980 config->manifestDependencies.insert(arg->getValue());
1983 if (auto *arg = args.getLastArg(OPT_manifest, OPT_manifest_colon)) {
1984 if (arg->getOption().getID() == OPT_manifest)
1987 parseManifest(arg->getValue());
1991 if (auto *arg = args.getLastArg(OPT_manifestuac))
1992 parseManifestUAC(arg->getValue());
1995 if (auto *arg = args.getLastArg(OPT_manifestfile))
1996 config->manifestFile = arg->getValue();
1999 for (auto *arg : args.filtered(OPT_manifestinput))
2000 config->manifestInput.push_back(arg->getValue());
2038 for (auto *arg : args.filtered(OPT_swaprun))
2039 parseSwaprun(arg->getValue());
2084 for (auto *arg : args.filtered(OPT_wholearchive_file))
2085 if (std::optional<StringRef> path = findFile(arg->getValue()))
2107 for (auto *arg : args) {
2108 switch (arg->getOption().getID()) {
2111 error("stray " + arg->getSpelling());
2116 error("nested " + arg->getSpelling());
2120 if (std::optional<StringRef> path = findFileIfNew(arg->getValue()))
2124 if (std::optional<StringRef> path = findFileIfNew(arg->getValue()))
2164 for (auto *arg : args.filtered(OPT_defaultlib))
2165 if (std::optional<StringRef> path = findLibIfNew(arg->getValue()))
2182 for (auto *arg : args.filtered(OPT_functionpadmin, OPT_functionpadmin_opt))
2183 parseFunctionPadMin(arg);
2186 for (auto *arg :
2188 parseDependentLoadFlags(arg);
2214 for (auto *arg : args.filtered(OPT_export)) {
2215 Export e = parseExport(arg->getValue());
2227 if (auto *arg = args.getLastArg(OPT_deffile)) {
2229 parseModuleDefs(arg->getValue());
2253 if (auto *arg = args.getLastArg(OPT_entry)) {
2254 if (!arg->getValue()[0])
2256 config->entry = addUndefined(mangle(arg->getValue()));
2280 for (auto *arg : args.filtered(OPT_delayload)) {
2281 config->delayLoads.insert(StringRef(arg->getValue()).lower());
2307 for (auto *arg : args.filtered(OPT_map_info)) {
2308 std::string s = StringRef(arg->getValue()).lower();
2444 for (auto *arg : args.filtered(OPT_include_optional))
2445 if (isa_and_nonnull<LazyArchive>(ctx.symtab.find(arg->getValue())))
2446 addUndefined(arg->getValue());
2558 if (auto *arg = args.getLastArg(OPT_output_def))
2559 writeDefFile(arg->getValue(), config->exports);
2595 if (auto *arg = args.getLastArg(OPT_order)) {
2598 parseOrderFile(arg->getValue());
2605 if (auto *arg = args.getLastArg(OPT_call_graph_ordering_file)) {
2606 parseCallGraphFile(arg->getValue());
2612 if (auto *arg = args.getLastArg(OPT_print_symbol_order))
2613 config->printSymbolOrder = arg->getValue();