diff options
author | Fangrui Song <i@maskray.me> | 2025-05-25 22:11:09 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-05-25 22:11:09 -0700 |
commit | 9909cf53039c3ab48fc2b8e43c70342e33cdccee (patch) | |
tree | 900f6fc4d62bfdf52571411541d166904183eb3c /llvm/lib/MC/MCExpr.cpp | |
parent | fe518e77d3e363ea14ac21dd8fd4ae7b2807e88f (diff) | |
download | llvm-9909cf53039c3ab48fc2b8e43c70342e33cdccee.zip llvm-9909cf53039c3ab48fc2b8e43c70342e33cdccee.tar.gz llvm-9909cf53039c3ab48fc2b8e43c70342e33cdccee.tar.bz2 |
llvm-ml: Rework the alias directive to not use ELF-intended VK_WEAKREF
Set `WeakExternal` to disable the the expansion in MCExpr.cpp:canExpand.
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index 2efcfbc..e0948de 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -478,13 +478,7 @@ static bool canExpand(const MCSymbol &Sym, bool InSet) { if (Sym.isWeakExternal()) return false; - const MCExpr *Expr = Sym.getVariableValue(true); - // Special case for llvm-ml alias - const auto *Inner = dyn_cast<MCSymbolRefExpr>(Expr); - if (Inner) { - if (Inner->getKind() == MCSymbolRefExpr::VK_WEAKREF) - return false; - } + Sym.getVariableValue(true); if (InSet) return true; |