aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCExpr.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-05-25 22:11:09 -0700
committerFangrui Song <i@maskray.me>2025-05-25 22:11:09 -0700
commit9909cf53039c3ab48fc2b8e43c70342e33cdccee (patch)
tree900f6fc4d62bfdf52571411541d166904183eb3c /llvm/lib/MC/MCExpr.cpp
parentfe518e77d3e363ea14ac21dd8fd4ae7b2807e88f (diff)
downloadllvm-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.cpp8
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;