@@ -263,11 +263,12 @@ bool Options::processInstallAPIXOptions(InputArgList &Args) {
263
263
}
264
264
const StringRef ASpelling = NextA->getSpelling ();
265
265
const auto &AValues = NextA->getValues ();
266
+ auto &UniqueArgs = FEOpts.UniqueArgs [Label];
266
267
if (AValues.empty ())
267
- FEOpts. UniqueArgs [Label] .emplace_back (ASpelling.str ());
268
+ UniqueArgs.emplace_back (ASpelling.str ());
268
269
else
269
270
for (const StringRef Val : AValues)
270
- FEOpts. UniqueArgs [Label] .emplace_back ((ASpelling + Val).str ());
271
+ UniqueArgs.emplace_back ((ASpelling + Val).str ());
271
272
272
273
A->claim ();
273
274
NextA->claim ();
@@ -608,32 +609,37 @@ Options::processAndFilterOutInstallAPIOptions(ArrayRef<const char *> Args) {
608
609
ParsedArgs.hasArg (OPT_not_for_dyld_shared_cache);
609
610
610
611
for (const Arg *A : ParsedArgs.filtered (OPT_allowable_client)) {
612
+ auto It = ArgToArchMap.find (A);
611
613
LinkerOpts.AllowableClients [A->getValue ()] =
612
- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
614
+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
613
615
A->claim ();
614
616
}
615
617
616
618
for (const Arg *A : ParsedArgs.filtered (OPT_reexport_l)) {
619
+ auto It = ArgToArchMap.find (A);
617
620
LinkerOpts.ReexportedLibraries [A->getValue ()] =
618
- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
621
+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
619
622
A->claim ();
620
623
}
621
624
622
625
for (const Arg *A : ParsedArgs.filtered (OPT_reexport_library)) {
626
+ auto It = ArgToArchMap.find (A);
623
627
LinkerOpts.ReexportedLibraryPaths [A->getValue ()] =
624
- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
628
+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
625
629
A->claim ();
626
630
}
627
631
628
632
for (const Arg *A : ParsedArgs.filtered (OPT_reexport_framework)) {
633
+ auto It = ArgToArchMap.find (A);
629
634
LinkerOpts.ReexportedFrameworks [A->getValue ()] =
630
- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
635
+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
631
636
A->claim ();
632
637
}
633
638
634
639
for (const Arg *A : ParsedArgs.filtered (OPT_rpath)) {
640
+ auto It = ArgToArchMap.find (A);
635
641
LinkerOpts.RPaths [A->getValue ()] =
636
- ArgToArchMap.count (A ) ? ArgToArchMap[A] : ArchitectureSet ();
642
+ It != ArgToArchMap.end ( ) ? It-> second : ArchitectureSet ();
637
643
A->claim ();
638
644
}
639
645
0 commit comments