================ @@ -116,6 +117,13 @@ CXStringSet *createSet(const std::vector<std::string> &Strings) { return Set; } +CXStringSet *createSet(const std::vector<std::string> &Strings) { + return createSetImpl(Strings); +} + +CXStringSet *createSet(const std::vector<StringRef> &Strings) { + return createSetImpl(Strings); ---------------- jansvoboda11 wrote:
This still ends up calling `createDup()` on line 116 though. I'd expect this to call `createRef()` so that we actually do avoid the copies. Also, it'd be better to take the type-erasing `ArrayRef<StringRef>`, it's more general than `const std::vector<StringRef> &`. If some other client in the future ends up having something like `llvm::SmallVector<StringRef>`, they'll be able to use that right away (instead of having to allocate a new `std::vector`, or create yet another overload of this function for `SmallVector`). https://github.com/llvm/llvm-project/pull/136773 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits