[PATCH] D145208: [COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 16:57:47 PST 2023


efriedma added inline comments.


================
Comment at: llvm/lib/MC/MCExpr.cpp:764
 static bool canExpand(const MCSymbol &Sym, bool InSet) {
+  if (Sym.isWeakExternal())
+    return false;
----------------
bcl5980 wrote:
> Do we need to limit it to AntiDep only? This code looks means any weak symbol can form a cycle.
isWeakExternal should be true for any symbol where we call setIsWeakExternal, which should be all weak symbols on Windows.

The whole recursion this is just much less likely to be relevant for non-AntiDep weak symbols; I've never seen this sort of usage of aliases elsewhere.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145208



More information about the llvm-commits mailing list