[llvm] [SHT_LLVM_BB_ADDR_MAP] Add assertion and clarify docstring (PR #77374)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 00:25:50 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 emptied.
----------------
boomanaiden154 wrote:
Good point. Reworded it to only keep that phrasing in the first sentence.
https://github.com/llvm/llvm-project/pull/77374
More information about the llvm-commits
mailing list