[lld] [lld] Sort code section chunks by range types on Arm64EC targets. (PR #69099)
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 15 12:33:37 PDT 2023
================
@@ -418,6 +426,24 @@ inline StringRef Chunk::getDebugName() const {
return static_cast<const NonSectionChunk *>(this)->getDebugName();
}
+inline MachineTypes Chunk::getMachine() const {
+ if (isa<SectionChunk>(this))
+ return static_cast<const SectionChunk *>(this)->getMachine();
+ else
+ return static_cast<const NonSectionChunk *>(this)->getMachine();
----------------
compnerd wrote:
Unnecessary `else`.
```suggestion
return static_cast<const NonSectionChunk *>(this)->getMachine();
```
https://github.com/llvm/llvm-project/pull/69099
More information about the llvm-commits
mailing list