@@ -263,11 +263,12 @@ bool Options::processInstallAPIXOptions(InputArgList &Args) {
263263 }
264264 const StringRef ASpelling = NextA->getSpelling ();
265265 const auto &AValues = NextA->getValues ();
266+ auto &UniqueArgs = FEOpts.UniqueArgs [Label];
266267 if (AValues.empty ())
267- FEOpts. UniqueArgs [Label] .emplace_back (ASpelling.str ());
268+ UniqueArgs.emplace_back (ASpelling.str ());
268269 else
269270 for (const StringRef Val : AValues)
270- FEOpts. UniqueArgs [Label] .emplace_back ((ASpelling + Val).str ());
271+ UniqueArgs.emplace_back ((ASpelling + Val).str ());
271272
272273 A->claim ();
273274 NextA->claim ();
@@ -608,32 +609,37 @@ Options::processAndFilterOutInstallAPIOptions(ArrayRef<const char *> Args) {
608609 ParsedArgs.hasArg (OPT_not_for_dyld_shared_cache);
609610
610611 for (const Arg *A : ParsedArgs.filtered (OPT_allowable_client)) {
612+ auto It = ArgToArchMap.find (A);
611613 LinkerOpts.AllowableClients [A->getValue ()] =
612- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
614+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
613615 A->claim ();
614616 }
615617
616618 for (const Arg *A : ParsedArgs.filtered (OPT_reexport_l)) {
619+ auto It = ArgToArchMap.find (A);
617620 LinkerOpts.ReexportedLibraries [A->getValue ()] =
618- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
621+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
619622 A->claim ();
620623 }
621624
622625 for (const Arg *A : ParsedArgs.filtered (OPT_reexport_library)) {
626+ auto It = ArgToArchMap.find (A);
623627 LinkerOpts.ReexportedLibraryPaths [A->getValue ()] =
624- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
628+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
625629 A->claim ();
626630 }
627631
628632 for (const Arg *A : ParsedArgs.filtered (OPT_reexport_framework)) {
633+ auto It = ArgToArchMap.find (A);
629634 LinkerOpts.ReexportedFrameworks [A->getValue ()] =
630- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
635+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
631636 A->claim ();
632637 }
633638
634639 for (const Arg *A : ParsedArgs.filtered (OPT_rpath)) {
640+ auto It = ArgToArchMap.find (A);
635641 LinkerOpts.RPaths [A->getValue ()] =
636- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
642+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
637643 A->claim ();
638644 }
639645
0 commit comments