[all-commits] [llvm/llvm-project] 33246f: [MC] Rework evaluateSymbolicAdd to eliminate MCVal...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat Apr 5 11:16:34 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 33246f79e87a0e629ae776d1811a1175a3f10065
https://github.com/llvm/llvm-project/commit/33246f79e87a0e629ae776d1811a1175a3f10065
Author: Fangrui Song <i at maskray.me>
Date: 2025-04-05 (Sat, 05 Apr 2025)
Changed paths:
M llvm/include/llvm/MC/MCExpr.h
M llvm/include/llvm/MC/MCObjectWriter.h
M llvm/include/llvm/MC/MCValue.h
M llvm/lib/MC/MCAssembler.cpp
M llvm/lib/MC/MCExpr.cpp
M llvm/lib/MC/MCObjectWriter.cpp
M llvm/test/MC/AArch64/elf-reloc-ptrauth.s
M llvm/test/MC/AArch64/label-arithmetic-diags-darwin.s
M llvm/test/MC/ELF/bad-expr.s
M llvm/test/MC/X86/macho-reloc-errors-x86_64.s
Log Message:
-----------
[MC] Rework evaluateSymbolicAdd to eliminate MCValue::SymB reliance
Reworked evaluateSymbolicAdd and isSymbolRefDifferenceFullyResolved to
remove their reliance on MCValue::SymB, which previously used the
MCSymbolRefExpr member when folding two symbolic expressions. This
dependency prevented replacing MCValue::SymB with a MCSymbol. By
refactoring, we enable this replacement, which is a more significant
improvement.
Note that this change eliminates the rare "unsupported subtraction of
qualified symbol" diagnostic, resulting in a minor loss of information.
However, the benefit of enabling MCValue::SymB replacement with MCSymbol
outweighs this slight regression.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list