Skip to content

Commit 2b0256e

Browse files
committed
[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.
1 parent fdb408f commit 2b0256e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/MC/MCValue.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,5 @@ MCSymbolRefExpr::VariantKind MCValue::getAccessVariant() const {
5454
if (!A)
5555
return MCSymbolRefExpr::VK_None;
5656

57-
MCSymbolRefExpr::VariantKind Kind = A->getKind();
58-
if (Kind == MCSymbolRefExpr::VK_WEAKREF)
59-
return MCSymbolRefExpr::VK_None;
60-
return Kind;
57+
return A->getKind();
6158
}

0 commit comments

Comments
 (0)