Lines Matching refs:Arg

325   if (auto *Arg = Args.getLastArg(OPT_reproduce))  in getReproduceOption()  local
326 return Arg->getValue(); in getReproduceOption()
331 for (auto *Arg : Args.filtered(OPT_z)) in hasZOption() local
332 if (Key == Arg->getValue()) in hasZOption()
339 for (auto *Arg : Args.filtered_reverse(OPT_z)) { in getZFlag() local
340 if (K1 == Arg->getValue()) in getZFlag()
342 if (K2 == Arg->getValue()) in getZFlag()
364 for (auto *Arg : Args.filtered(OPT_z)) in checkZOptions() local
365 if (!isKnownZFlag(Arg->getValue())) in checkZOptions()
366 error("unknown -z value: " + StringRef(Arg->getValue())); in checkZOptions()
467 for (auto *Arg : llvm::reverse(Args)) { in getUnresolvedSymbolPolicy() local
468 switch (Arg->getOption().getID()) { in getUnresolvedSymbolPolicy()
470 StringRef S = Arg->getValue(); in getUnresolvedSymbolPolicy()
481 if (StringRef(Arg->getValue()) == "defs") in getUnresolvedSymbolPolicy()
519 auto *Arg = in getDiscard() local
521 if (!Arg) in getDiscard()
523 if (Arg->getOption().getID() == OPT_discard_all) in getDiscard()
525 if (Arg->getOption().getID() == OPT_discard_locals) in getDiscard()
531 auto *Arg = Args.getLastArg(OPT_dynamic_linker, OPT_no_dynamic_linker); in getDynamicLinker() local
532 if (!Arg || Arg->getOption().getID() == OPT_no_dynamic_linker) in getDynamicLinker()
534 return Arg->getValue(); in getDynamicLinker()
538 auto *Arg = Args.getLastArg(OPT_icf_none, OPT_icf_safe, OPT_icf_all); in getICF() local
539 if (!Arg || Arg->getOption().getID() == OPT_icf_none) in getICF()
541 if (Arg->getOption().getID() == OPT_icf_safe) in getICF()
550 auto *Arg = Args.getLastArg(OPT_strip_all, OPT_strip_debug); in getStrip() local
551 if (!Arg) in getStrip()
553 if (Arg->getOption().getID() == OPT_strip_all) in getStrip()
558 static uint64_t parseSectionAddress(StringRef S, const opt::Arg &Arg) { in parseSectionAddress() argument
563 error("invalid argument: " + toString(Arg)); in parseSectionAddress()
569 for (auto *Arg : Args.filtered(OPT_section_start)) { in getSectionStartMap() local
572 std::tie(Name, Addr) = StringRef(Arg->getValue()).split('='); in getSectionStartMap()
573 Ret[Name] = parseSectionAddress(Addr, *Arg); in getSectionStartMap()
576 if (auto *Arg = Args.getLastArg(OPT_Ttext)) in getSectionStartMap() local
577 Ret[".text"] = parseSectionAddress(Arg->getValue(), *Arg); in getSectionStartMap()
578 if (auto *Arg = Args.getLastArg(OPT_Tdata)) in getSectionStartMap() local
579 Ret[".data"] = parseSectionAddress(Arg->getValue(), *Arg); in getSectionStartMap()
580 if (auto *Arg = Args.getLastArg(OPT_Tbss)) in getSectionStartMap() local
581 Ret[".bss"] = parseSectionAddress(Arg->getValue(), *Arg); in getSectionStartMap()
612 auto *Arg = Args.getLastArg(OPT_build_id, OPT_build_id_eq); in getBuildId() local
613 if (!Arg) in getBuildId()
616 if (Arg->getOption().getID() == OPT_build_id) in getBuildId()
619 StringRef S = Arg->getValue(); in getBuildId()
718 auto *Arg = Args.getLastArg(Id); in getOldNewOptions() local
719 if (!Arg) in getOldNewOptions()
722 StringRef S = Arg->getValue(); in getOldNewOptions()
725 error(Arg->getSpelling() + " expects 'old;new' format, but got " + S); in getOldNewOptions()
896 if (auto *Arg = Args.getLastArg(OPT_plugin_opt_mcpu_eq)) in readConfigs() local
897 parseClangOption(Saver.save("-mcpu=" + StringRef(Arg->getValue())), in readConfigs()
898 Arg->getSpelling()); in readConfigs()
900 for (auto *Arg : Args.filtered(OPT_plugin_opt)) in readConfigs() local
901 parseClangOption(Arg->getValue(), Arg->getSpelling()); in readConfigs()
904 for (auto *Arg : Args.filtered(OPT_mllvm)) in readConfigs() local
905 parseClangOption(Arg->getValue(), Arg->getSpelling()); in readConfigs()
918 if (auto *Arg = Args.getLastArg(OPT_m)) { in readConfigs() local
919 StringRef S = Arg->getValue(); in readConfigs()
927 if (auto *Arg = Args.getLastArg(OPT_hash_style)) { in readConfigs() local
928 StringRef S = Arg->getValue(); in readConfigs()
954 if (auto *Arg = Args.getLastArg(OPT_symbol_ordering_file)) in readConfigs() local
955 if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue())) in readConfigs()
960 if (auto *Arg = Args.getLastArg(OPT_retain_symbols_file)) { in readConfigs() local
962 if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue())) in readConfigs()
975 for (auto *Arg : Args.filtered(OPT_dynamic_list)) in readConfigs() local
976 if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue())) in readConfigs()
979 for (auto *Arg : Args.filtered(OPT_export_dynamic_symbol)) in readConfigs() local
981 {Arg->getValue(), /*IsExternCpp*/ false, /*HasWildcard*/ false}); in readConfigs()
988 for (auto *Arg : Args.filtered(OPT_export_dynamic_symbol)) in readConfigs() local
989 Config->Undefined.push_back(Arg->getValue()); in readConfigs()
991 for (auto *Arg : Args.filtered(OPT_version_script)) in readConfigs() local
992 if (Optional<std::string> Path = searchScript(Arg->getValue())) { in readConfigs()
996 error(Twine("cannot find version script ") + Arg->getValue()); in readConfigs()
1063 for (auto *Arg : Args) { in createFiles() local
1064 switch (Arg->getOption().getUnaliasedOption().getID()) { in createFiles()
1066 addLibrary(Arg->getValue()); in createFiles()
1069 addFile(Arg->getValue(), /*WithLOption=*/false); in createFiles()
1074 std::tie(From, To) = StringRef(Arg->getValue()).split('='); in createFiles()
1076 error("-defsym: syntax error: " + StringRef(Arg->getValue())); in createFiles()
1082 if (Optional<std::string> Path = searchScript(Arg->getValue())) { in createFiles()
1087 error(Twine("cannot find linker script ") + Arg->getValue()); in createFiles()
1093 Config->FormatBinary = isFormatBinary(Arg->getValue()); in createFiles()
1111 if (Optional<MemoryBufferRef> MB = readFile(Arg->getValue())) { in createFiles()
1191 auto *Arg = Args.getLastArg(OPT_image_base); in getImageBase() local
1192 if (!Arg) in getImageBase()
1195 StringRef S = Arg->getValue(); in getImageBase()
1210 for (auto *Arg : Args.filtered(OPT_exclude_libs)) { in getExcludeLibs() local
1211 StringRef S = Arg->getValue(); in getExcludeLibs()
1312 for (auto *Arg : Args.filtered(OPT_keep_unique)) { in findKeepUniqueSections() local
1313 StringRef Name = Arg->getValue(); in findKeepUniqueSections()
1389 for (auto *Arg : Args.filtered(OPT_wrap)) { in addWrappedSymbols() local
1390 StringRef Name = Arg->getValue(); in addWrappedSymbols()
1487 for (auto *Arg : Args.filtered(OPT_trace_symbol)) in link() local
1488 Symtab->trace(Arg->getValue()); in link()
1646 if (auto *Arg = Args.getLastArg(OPT_call_graph_ordering_file)) in link() local
1647 if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue())) in link()