================ @@ -54,19 +54,18 @@ class FlattenedSpelling { const Record &OriginalSpelling; public: - FlattenedSpelling(const std::string &Variety, const std::string &Name, + FlattenedSpelling(const std::string &Variety, StringRef Name, const std::string &Namespace, bool KnownToGCC, ---------------- kazutakahirata wrote:
Could you make all of `const std::string &` here into `StringRef`? Partly for consistency among the parameters, partly for performance. IIUC, users below pass string literals like `"GNU"` and `"CXX11"`. That means that we create temporary instances of `std::string` there, pass them to this constructor by const reference, and then create duplicate instances of `std::string`. If you could create a PR just for the changes to `FlattenSpelling`, that would be greatly appreciated. Thanks! https://github.com/llvm/llvm-project/pull/113645 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits