[clang] [llvm] [clang][CodeGen] Place constructor/destructor functions in .text.startup/.text… (PR #200221)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 10 11:57:20 PDT 2026


================
@@ -1864,7 +1864,8 @@ bool TargetInstrInfo::isFunctionSafeToSplit(const MachineFunction &MF) const {
   // or functions of unknown hotness. Lukewarm functions have no prefix.
   std::optional<StringRef> SectionPrefix = MF.getFunction().getSectionPrefix();
   if (SectionPrefix &&
-      (*SectionPrefix == "unlikely" || *SectionPrefix == "unknown")) {
+      (*SectionPrefix == "unlikely" || *SectionPrefix == "unknown" ||
+       *SectionPrefix == "startup" || *SectionPrefix == "exit")) {
----------------
efriedma-quic wrote:

Missing test coverage for this change.

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


More information about the cfe-commits mailing list