[PATCH] D152869: [nfc] Factoring out utility that can be used for other object-level tools

Dayann D'almeida via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 10:40:12 PDT 2023


JestrTulip updated this revision to Diff 533695.
JestrTulip added a comment.

feedback: const changes in objdump.h


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152869/new/

https://reviews.llvm.org/D152869

Files:
  llvm/include/llvm/Object/ObjectFile.h
  llvm/tools/llvm-objdump/llvm-objdump.h


Index: llvm/tools/llvm-objdump/llvm-objdump.h
===================================================================
--- llvm/tools/llvm-objdump/llvm-objdump.h
+++ llvm/tools/llvm-objdump/llvm-objdump.h
@@ -70,7 +70,7 @@
 /// Idx is an optional output parameter that keeps track of which section index
 /// this is. This may be different than the actual section number, as some
 /// sections may be filtered (e.g. symbol tables).
-object::SectionFilter ToolSectionFilter(llvm::object::ObjectFile const &O,
+object::SectionFilter ToolSectionFilter(const llvm::object::ObjectFile &O,
                                         uint64_t *Idx = nullptr);
 
 bool isRelocAddressLess(object::RelocationRef A, object::RelocationRef B);
Index: llvm/include/llvm/Object/ObjectFile.h
===================================================================
--- llvm/include/llvm/Object/ObjectFile.h
+++ llvm/include/llvm/Object/ObjectFile.h
@@ -46,6 +46,7 @@
 
 using section_iterator = content_iterator<SectionRef>;
 
+typedef std::function<bool(const SectionRef &)> SectionFilterPredicate;
 typedef std::function<bool(const SectionRef &)> SectionFilterPredicate;
 /// This is a value type class that represents a single relocation in the list
 /// of relocations in the object file.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152869.533695.patch
Type: text/x-patch
Size: 1265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230622/bf3a909b/attachment.bin>


More information about the llvm-commits mailing list