[llvm] [SHT_LLVM_BB_ADDR_MAP] Add assertion and clarify docstring (PR #77374)

Rahman Lavaee via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 13:11:16 PST 2024


================
@@ -110,11 +110,12 @@ class ELFObjectFileBase : public ObjectFile {
   Expected<std::vector<VersionEntry>> readDynsymVersions() const;
 
   /// Returns a vector of all BB address maps in the object file. When
-  // `TextSectionIndex` is specified, only returns the BB address maps
-  // corresponding to the section with that index. When `PGOAnalyses`is
-  // specified, the vector is cleared then filled with extra PGO data.
-  // `PGOAnalyses` will always be the same length as the return value on
-  // success, otherwise it is empty.
+  /// `TextSectionIndex` is specified, only returns the BB address maps
+  /// corresponding to the section with that index. When `PGOAnalyses`is
+  /// specified, the vector is cleared then filled with extra PGO data.
+  /// When PGO information is requested (`PGOAnalyses` is not nullptr),
+  /// `PGOAnalyses` will always be the same length as the return value,
+  /// assuming no error occurs. Upon failure, `PGOAnalyses` will be empty.
----------------
rlavaee wrote:

will be erased/emptied/cleared.

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


More information about the llvm-commits mailing list