[MC] Ignore VK_WEAKREF in MCValue::getAccessVariant

MCSymbolRefExpr::getVariantKindForName does not return VK_WEAKREF, so this code path is not exercised. Moreoever, .weakref is probably a feature that nobody uses.
This commit is contained in:
Fangrui Song 2019-12-15 16:03:56 -08:00
parent fdb408f348
commit 2b0256e49b
1 changed files with 1 additions and 4 deletions

View File

@ -54,8 +54,5 @@ MCSymbolRefExpr::VariantKind MCValue::getAccessVariant() const {
if (!A)
return MCSymbolRefExpr::VK_None;
MCSymbolRefExpr::VariantKind Kind = A->getKind();
if (Kind == MCSymbolRefExpr::VK_WEAKREF)
return MCSymbolRefExpr::VK_None;
return Kind;
return A->getKind();
}