scott.linder added inline comments.
================ Comment at: clang/include/clang/Basic/CodeGenOptions.h:209 - std::map<std::string, std::string> DebugPrefixMap; + llvm::SmallVector<std::pair<std::string, std::string>, 0> DebugPrefixMap; std::map<std::string, std::string> CoveragePrefixMap; ---------------- What benefit does forcing allocation have? Why not use the default, or switch to `std::vector`? ================ Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:72-79 CGDebugInfo::CGDebugInfo(CodeGenModule &CGM) : CGM(CGM), DebugKind(CGM.getCodeGenOpts().getDebugInfo()), DebugTypeExtRefs(CGM.getCodeGenOpts().DebugTypeExtRefs), DBuilder(CGM.getModule()) { - for (const auto &KV : CGM.getCodeGenOpts().DebugPrefixMap) - DebugPrefixMap[KV.first] = KV.second; + for (const auto &[From, To] : CGM.getCodeGenOpts().DebugPrefixMap) + DebugPrefixMap.emplace_back(From, To); CreateCompileUnit(); ---------------- Can you use the member-initializer-list here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148975/new/ https://reviews.llvm.org/D148975 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits