================
@@ -833,6 +840,17 @@ class APINotesReader::Implementation {
   /// optional if the string is unknown.
   std::optional<IdentifierID> getIdentifier(llvm::StringRef Str);
 
+  /// Retrieve the identifier string for the given ID, or an empty optional if
+  /// the ID is unknown.
+  std::optional<llvm::StringRef> getIdentifierString(IdentifierID ID);
+
+  /// Collect exact parameter selector keys stored in the given function-like
+  /// table.
+  template <typename TableT>
+  bool collectExactFunctionParameterSelectors(
+      TableT *Table, bool IsCXXMethod,
----------------
j-hui wrote:

Since this is only ever called with `SerializedGlobalFunctionTable` and 
`SerializedCXXMethodTable`, I wonder if you can do some metaprogramming in 
`collectExactFunctionParameterSelectors` to get rid of the `IsCXXMethod` 
parameter, e.g. something like:

```c++
static_assert(std::is_same<SerializedGlobalFunctionTable, TableT> ||
              std::is_same<SerializedCXXMethodTable, TableT>);
bool IsCXXMethod = std::is_same_v<SerializedCXXMethodTable, TableT>;
```

https://github.com/llvm/llvm-project/pull/209408
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to