[lld] [lld] Sort code section chunks by range types on Arm64EC targets. (PR #69099)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 05:01:55 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();
----------------
cjacek wrote:

I wrote it that way to be consistent with other similar functions in that file (just above the new one). Should such change be a separated NFC MR keeping them consistent?

https://github.com/llvm/llvm-project/pull/69099


More information about the llvm-commits mailing list