diff options
author | Fangrui Song <i@maskray.me> | 2025-04-01 00:06:04 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-04-01 00:06:05 -0700 |
commit | 36978fadb8e14c944b71fa63b876012cb2c444c2 (patch) | |
tree | 3dfa20c0593629f5c1cf9e64c1683c4ca2a9b896 /llvm/lib/MC/MCExpr.cpp | |
parent | 7267dbfe1032f5ebd698403848fab4bbfcbe0b19 (diff) | |
download | llvm-36978fadb8e14c944b71fa63b876012cb2c444c2.zip llvm-36978fadb8e14c944b71fa63b876012cb2c444c2.tar.gz llvm-36978fadb8e14c944b71fa63b876012cb2c444c2.tar.bz2 |
[MC] Add UseAtForSpecifier
Some ELF targets don't use @ for relocation specifiers.
We should not report `error: invalid variant` when @ is used.
Attempt to make expr@specifier parsing less hacky.
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index fa5c3da..773df74 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -93,7 +93,7 @@ void MCExpr::print(raw_ostream &OS, const MCAsmInfo *MAI, if (Kind != MCSymbolRefExpr::VK_None) { if (!MAI) // should only be used by dump() OS << "@<variant " << Kind << '>'; - else if (MAI->useParensForSymbolVariant()) // ARM + else if (MAI->useParensForSpecifier()) // ARM OS << '(' << MAI->getSpecifierName(Kind) << ')'; else OS << '@' << MAI->getSpecifierName(Kind); |