From 3185da15b2cd4fddd5cece97ec73c75180f4eed2 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 15 Dec 2019 16:03:56 -0800 Subject: [PATCH] [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. --- lib/MC/MCValue.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/MC/MCValue.cpp b/lib/MC/MCValue.cpp index 81da47b2ece..b6bcec9b2ca 100644 --- a/lib/MC/MCValue.cpp +++ b/lib/MC/MCValue.cpp @@ -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(); }