[llvm] f18915d - [Propeller][ELF] Add Doxygen comment for decodeBBAddrMap
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 15:16:36 PDT 2023
Author: Aiden Grossman
Date: 2023-03-13T15:14:58-07:00
New Revision: f18915da1d64646a0c663a61368b30b71a494461
URL: https://github.com/llvm/llvm-project/commit/f18915da1d64646a0c663a61368b30b71a494461
DIFF: https://github.com/llvm/llvm-project/commit/f18915da1d64646a0c663a61368b30b71a494461.diff
LOG: [Propeller][ELF] Add Doxygen comment for decodeBBAddrMap
Adds a doxygen comment on decodeBBAddrMap specifying what it does as well
as some requirements that need to be met when calling it (especially
the condition of passing in a relocation section when the ELFFile is
relocatable).
Differential Revision: https://reviews.llvm.org/D145989
Added:
Modified:
llvm/include/llvm/Object/ELF.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h
index 7a9dd8cb79e72..0db0ebb5c7c32 100644
--- a/llvm/include/llvm/Object/ELF.h
+++ b/llvm/include/llvm/Object/ELF.h
@@ -392,6 +392,11 @@ class ELFFile {
Expected<ArrayRef<T>> getSectionContentsAsArray(const Elf_Shdr &Sec) const;
Expected<ArrayRef<uint8_t>> getSectionContents(const Elf_Shdr &Sec) const;
Expected<ArrayRef<uint8_t>> getSegmentContents(const Elf_Phdr &Phdr) const;
+
+ /// Returns a vector of BBAddrMap structs corresponding to each function
+ /// within the text section that the SHT_LLVM_BB_ADDR_MAP section \p Sec
+ /// is associated with. If the current ELFFile is relocatable, a corresponding
+ /// \p RelaSec must be passed in as an argument.
Expected<std::vector<BBAddrMap>>
decodeBBAddrMap(const Elf_Shdr &Sec, const Elf_Shdr *RelaSec = nullptr) const;
More information about the llvm-commits
mailing list