mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Small improvement to the recursion detection logic from the previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1565,7 +1565,9 @@ static bool IsUsedIn(const MCSymbol *Sym, const MCExpr *Value) {
|
||||
return false;
|
||||
case MCExpr::SymbolRef: {
|
||||
const MCSymbol &S = static_cast<const MCSymbolRefExpr*>(Value)->getSymbol();
|
||||
return &S.AliasedSymbol() == Sym;
|
||||
if (S.isVariable())
|
||||
return IsUsedIn(Sym, S.getVariableValue());
|
||||
return &S == Sym;
|
||||
}
|
||||
case MCExpr::Unary:
|
||||
return IsUsedIn(Sym, static_cast<const MCUnaryExpr*>(Value)->getSubExpr());
|
||||
|
Reference in New Issue
Block a user