tra added inline comments.
================ Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:735 + llvm::StringMap<unsigned> LastOpt; + for (unsigned I = 0, N = Features.size(); I < N; ++I) { + StringRef Name = Features[I]; ---------------- // Record the index of the last occurence of the feature. ================ Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:741 + + for (unsigned I = 0, N = Features.size(); I < N; ++I) { + StringRef Name = Features[I]; ---------------- // Populate UnifiedFeatures only with last mentions of specific feature. ================ Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:743-748 + llvm::StringMap<unsigned>::iterator LastI = + LastOpt.find(Name.drop_front(1)); + assert(LastI != LastOpt.end()); + unsigned Last = LastI->second; + if (Last != I) + continue; ---------------- ``` auto FeatureName = Name.drop_front(1); if (!LastOpt.count(FeatureName)) // could be just assert(LastOpt.count(FeatureName)) continue if (LastOpt[FeatureName] != I) // could be merged with the `if` above continue; ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/ https://reviews.llvm.org/D127686 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits