================
@@ -137,6 +137,29 @@ class APINotesWriter::Implementation {
.first->second;
}
+ FunctionTableKey
+ getFunctionKey(uint32_t ParentContextID, StringRef Name,
----------------
StoeckOverflow wrote:
An easy way to share this would be to factor the common body of the
reader/writer `getFunctionKey` variants into a small templated helper next to
`FunctionTableKey` in `APINotesFormat.h`, with a separate overload for the
name-only key, e.g.:
```cpp
template <typename GetIdentifierFn>
std::optional<FunctionTableKey>
getFunctionKeyImpl(uint32_t ParentContextID, llvm::StringRef Name,
llvm::ArrayRef<llvm::StringRef> Parameters,
GetIdentifierFn GetIdentifier);
```
What do you think? :)
https://github.com/llvm/llvm-project/pull/204147
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits