[llvm-branch-commits] [llvm] [SystemZ] Emit external aliases required for indirect symbol handling support (PR #183442)

Kai Nacke via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 26 07:29:24 PST 2026


================
@@ -151,6 +155,8 @@ void MCAsmInfoGOFF::printSwitchToSection(const MCSection &Section,
                 Sec.PRAttributes.Executable, Sec.PRAttributes.BindingScope);
       ED->Emitted = true;
       Sec.Emitted = true;
+      if (Sec.hasExternalName())
+        OS << Sec.getName() << " ALIAS \"" << Sec.getExternalName() << "\"\n";
----------------
redstar wrote:

Same.
Looks like using a lamba would avoid the repetition, e.g.

```
auto EmitExternalName = [&Sec]() {
  if (Sec.hasExternalName())
        OS << Sec.getName() << " ALIAS "C'" << Sec.getExternalName() << "'\n";
}
```

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


More information about the llvm-branch-commits mailing list