1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

[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 694df893ac
commit 3185da15b2

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();
}