projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdb408f
)
[MC] Ignore VK_WEAKREF in MCValue::getAccessVariant
author
Fangrui Song
<maskray@google.com>
Mon, 16 Dec 2019 00:03:56 +0000
(16:03 -0800)
committer
Fangrui Song
<maskray@google.com>
Mon, 16 Dec 2019 00:05:46 +0000
(16:05 -0800)
MCSymbolRefExpr::getVariantKindForName does not return VK_WEAKREF, so this code path is not exercised. Moreoever, .weakref is probably a feature that nobody uses.
llvm/lib/MC/MCValue.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/MC/MCValue.cpp
b/llvm/lib/MC/MCValue.cpp
index
81da47b
..
b6bcec9
100644
(file)
--- 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();
}