diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2024-03-01 16:42:22 -0800 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2024-03-01 16:53:12 -0800 |
commit | 864593b91d289c57c64a0f12658b9ff415da1ad8 (patch) | |
tree | 30ec3aa1729369c5961938ddf6c1b0c0f7d48939 | |
parent | 39b67c03214b24da103863abc77c625e71aadd34 (diff) |
[clang][api-notes] NFC: Upstream some documentation
-rw-r--r-- | clang/include/clang/APINotes/APINotesWriter.h | 13 | ||||
-rw-r--r-- | clang/lib/APINotes/APINotesReader.cpp | 8 |
2 files changed, 19 insertions, 2 deletions
diff --git a/clang/include/clang/APINotes/APINotesWriter.h b/clang/include/clang/APINotes/APINotesWriter.h index dad44623e16a..c5ca3e461779 100644 --- a/clang/include/clang/APINotes/APINotesWriter.h +++ b/clang/include/clang/APINotes/APINotesWriter.h @@ -5,7 +5,13 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - +// +// This file defines the \c APINotesWriter class that writes out source +// API notes data providing additional information about source code as +// a separate input, such as the non-nil/nilable annotations for +// method parameters. +// +//===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_APINOTES_WRITER_H #define LLVM_CLANG_APINOTES_WRITER_H @@ -20,11 +26,16 @@ namespace clang { class FileEntry; namespace api_notes { + +/// A class that writes API notes data to a binary representation that can be +/// read by the \c APINotesReader. class APINotesWriter { class Implementation; std::unique_ptr<Implementation> Implementation; public: + /// Create a new API notes writer with the given module name and + /// (optional) source file. APINotesWriter(llvm::StringRef ModuleName, const FileEntry *SF); ~APINotesWriter(); diff --git a/clang/lib/APINotes/APINotesReader.cpp b/clang/lib/APINotes/APINotesReader.cpp index 55ea4bae81e6..fbbe9c32ce12 100644 --- a/clang/lib/APINotes/APINotesReader.cpp +++ b/clang/lib/APINotes/APINotesReader.cpp @@ -5,7 +5,13 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - +// +// This file implements the \c APINotesReader class that reads source +// API notes data providing additional information about source code as +// a separate input, such as the non-nil/nilable annotations for +// method parameters. +// +//===----------------------------------------------------------------------===// #include "clang/APINotes/APINotesReader.h" #include "APINotesFormat.h" #include "llvm/ADT/Hashing.h" |