diff options
author | Eli Friedman <efriedma@quicinc.com> | 2023-04-17 13:15:46 -0700 |
---|---|---|
committer | Eli Friedman <efriedma@quicinc.com> | 2023-04-17 13:17:25 -0700 |
commit | 10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2 (patch) | |
tree | 4a7e6b501f6e0e44e1196d18cace1b80e7c01587 /llvm/lib/MC/MCParser/AsmParser.cpp | |
parent | b0b2b2e047caa5a7c4b7e15d4425493f2df18d79 (diff) | |
download | llvm-10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2.zip llvm-10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2.tar.gz llvm-10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2.tar.bz2 |
[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols
This is mostly useful for ARM64EC, which uses such symbols extensively.
One interesting quirk of ARM64EC is that we need to be able to emit weak
symbols that point at each other (so if either symbol is defined
elsewhere, both symbols point at the definition). This required a few
changes to the way we handle weak symbols on Windows.
Differential Revision: https://reviews.llvm.org/D145208
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index c49e513..254c747 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -6371,7 +6371,7 @@ static bool isSymbolUsedInExpression(const MCSymbol *Sym, const MCExpr *Value) { case MCExpr::SymbolRef: { const MCSymbol &S = static_cast<const MCSymbolRefExpr *>(Value)->getSymbol(); - if (S.isVariable()) + if (S.isVariable() && !S.isWeakExternal()) return isSymbolUsedInExpression(Sym, S.getVariableValue()); return &S == Sym; } |