aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELF.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-05-26 15:08:11 -0700
committerFangrui Song <i@maskray.me>2025-05-26 15:08:11 -0700
commit343428c666f9293ae260bbcf79130562b830b268 (patch)
tree5a22caefe88ae828b5ca0f08d4e9f19700360f4a /llvm/lib/Object/ELF.cpp
parent4cb25e2d37496a5f52a62a1f411a04dac20a8666 (diff)
downloadllvm-343428c666f9293ae260bbcf79130562b830b268.zip
llvm-343428c666f9293ae260bbcf79130562b830b268.tar.gz
llvm-343428c666f9293ae260bbcf79130562b830b268.tar.bz2
MC: Detect cyclic dependency for variable symbols
We report cyclic dependency errors for variable symbols and rely on isSymbolUsedInExpression in parseAssignmentExpression at parse time, which does not catch all setVariableValue cases (e.g. cyclic .weakref). Instead, add a bit to MCSymbol and check it when walking the variable value MCExpr. When a cycle is detected when we have a final layout, report an error and set the variable to a constant to avoid duplicate errors. isSymbolUsedInExpression is considered deprecated, but it is still used by AMDGPU (#112251).
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
0 files changed, 0 insertions, 0 deletions