[PATCH] D76519: [NFC] Refactor how CFI move sections are represented in AsmPrinter

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 10:09:11 PST 2020


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

The refactoring makes sense (did not notice that it was posted a couple of months ago!) . This dropped a confusing `isCFIMoveForDebugging` and removed the following block which confused me a bit.

  for (auto &F: M.getFunctionList()) {
        // If the module contains any function with unwind data,
        // .eh_frame has to be emitted.
        // Ignore functions that won't get emitted.
        if (!F.isDeclarationForLinker() && F.needsUnwindTableEntry()) {
          isCFIMoveForDebugging = false;
          break;
        }
      }

As a potential follow-up, I do want the `CFIMoveTypes` concept to be better documented and probably rename it if it does not convey the intended meaning to readers.

The code does allow both sections due to ForceDwarfFrameSection. Please give some time to @dblaikie who has commented.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76519/new/

https://reviews.llvm.org/D76519



More information about the llvm-commits mailing list