[PATCH] D76519: [NFC] Refactor how CFI section types are represented in AsmPrinter

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 08:29:53 PDT 2021


MaskRay accepted this revision.
MaskRay added a comment.

Thanks!



================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:359
         break;
-      }
+      if (getFunctionCFISectionType(F) != CFISection::None)
+        ModuleCFISection = getFunctionCFISectionType(F);
----------------
If you reorder `if (ModuleCFISection == CFISection::EH)` after `if (getFunctionCFISectionType(F) != CFISection::None)`, the loop will exit in the same iteration, not the next iteration.


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