The warning "ignoring memory region assignment for non-allocatable section" should be generated under the following conditions:
- sections without SHF_ALLOC attribute and,
- presence of input sections or data commands (ByteCommand)
The goal of the change is to reduce spurious warnings that are generated for some output sections that have no input section.
isa<ByteCommand>
Actually, you can rewrite this scope with llvm::any_of