diff --git a/lld/MachO/InputSection.cpp b/lld/MachO/InputSection.cpp index 3124db49ad2c..2e9804f4dab8 100644 --- a/lld/MachO/InputSection.cpp +++ b/lld/MachO/InputSection.cpp @@ -91,7 +91,7 @@ void InputSection::writeTo(uint8_t *buf) { } } -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; diff --git a/lld/MachO/InputSection.h b/lld/MachO/InputSection.h index 28b2ef80d9f3..94c24a736b19 100644 --- a/lld/MachO/InputSection.h +++ b/lld/MachO/InputSection.h @@ -87,7 +87,7 @@ inline bool isDebugSection(uint32_t flags) { llvm::MachO::S_ATTR_DEBUG; } -bool isCodeSection(InputSection *); +bool isCodeSection(const InputSection *); extern std::vector inputSections;