[PATCH] D102664: [lld][MachO] Adjust isCodeSection signature

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 21:16:14 PDT 2021


alexshap created this revision.
Herald added a reviewer: int3.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
alexshap requested review of this revision.
Herald added a project: LLVM.

This diff changes the type of the argument of isCodeSection to const InputSection *.
NFC.

Test plan: make check-lld-macho


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102664

Files:
  lld/MachO/InputSection.cpp
  lld/MachO/InputSection.h


Index: lld/MachO/InputSection.h
===================================================================
--- lld/MachO/InputSection.h
+++ lld/MachO/InputSection.h
@@ -87,7 +87,7 @@
          llvm::MachO::S_ATTR_DEBUG;
 }
 
-bool isCodeSection(InputSection *);
+bool isCodeSection(const InputSection *);
 
 extern std::vector<InputSection *> inputSections;
 
Index: lld/MachO/InputSection.cpp
===================================================================
--- lld/MachO/InputSection.cpp
+++ lld/MachO/InputSection.cpp
@@ -91,7 +91,7 @@
   }
 }
 
-bool macho::isCodeSection(InputSection *isec) {
+bool macho::isCodeSection(const InputSection *isec) {
   uint32_t type = isec->flags & SECTION_TYPE;
   if (type != S_REGULAR && type != S_COALESCED)
     return false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102664.346038.patch
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210518/f42aad3d/attachment-0001.bin>


More information about the llvm-commits mailing list