[clang] [APINotes] Support annotating C++ methods (PR #99512)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 10:05:31 PDT 2024


================
@@ -794,6 +831,33 @@ void APINotesWriter::Implementation::writeObjCMethodBlock(
   }
 }
 
+void APINotesWriter::Implementation::writeCXXMethodBlock(
+    llvm::BitstreamWriter &Stream) {
+  llvm::BCBlockRAII Scope(Stream, CXX_METHOD_BLOCK_ID, 3);
+
+  if (CXXMethods.empty())
+    return;
+
+  {
+    llvm::SmallString<4096> HashTableBlob;
+    uint32_t Offset;
+    {
+      llvm::OnDiskChainedHashTableGenerator<CXXMethodTableInfo> Generator;
+      for (auto &OM : CXXMethods)
----------------
compnerd wrote:

`OM` was likely for `ObjCMethod`, this really should be `MD` for `MethodDecl`.

https://github.com/llvm/llvm-project/pull/99512


More information about the cfe-commits mailing list