summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCValue.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-12-15 16:03:56 -0800
committerFangrui Song <maskray@google.com>2019-12-15 16:05:46 -0800
commit2b0256e49bbe5c0dc9c8f4800b1e2f131026cb45 (patch)
tree792421a9b11f1e2d12bd780528eb30f22df07d64 /llvm/lib/MC/MCValue.cpp
parentfdb408f348f91f8eb4ecc32527aebfb6286e55cb (diff)
downloadbcm5719-llvm-2b0256e49bbe5c0dc9c8f4800b1e2f131026cb45.tar.gz
bcm5719-llvm-2b0256e49bbe5c0dc9c8f4800b1e2f131026cb45.zip
[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.
Diffstat (limited to 'llvm/lib/MC/MCValue.cpp')
-rw-r--r--llvm/lib/MC/MCValue.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCValue.cpp b/llvm/lib/MC/MCValue.cpp
index 81da47b2ece..b6bcec9b2ca 100644
--- a/llvm/lib/MC/MCValue.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud