summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSymbolELF.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-12-15 20:32:08 -0800
committerFangrui Song <maskray@google.com>2019-12-15 20:39:25 -0800
commitd25db94fa755651e42b15a51f2e8538f684418b7 (patch)
tree5ed671d42e9153246ceb6d87c73838a9ab27abf2 /llvm/lib/MC/MCSymbolELF.cpp
parent7e0fd77645cf6eae1994b255a307b016180c8a83 (diff)
downloadbcm5719-llvm-d25db94fa755651e42b15a51f2e8538f684418b7.tar.gz
bcm5719-llvm-d25db94fa755651e42b15a51f2e8538f684418b7.zip
[MC] Delete STT_SECTION special cases from MCSymbolELF::setType and setBinding
The special cases added by rL293936 were no longer needed after rL296180 disallowed redefinition of section symbols.
Diffstat (limited to 'llvm/lib/MC/MCSymbolELF.cpp')
-rw-r--r--llvm/lib/MC/MCSymbolELF.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCSymbolELF.cpp b/llvm/lib/MC/MCSymbolELF.cpp
index a07c56c64f8..1830b87fd85 100644
--- a/llvm/lib/MC/MCSymbolELF.cpp
+++ b/llvm/lib/MC/MCSymbolELF.cpp
@@ -40,8 +40,6 @@ enum {
void MCSymbolELF::setBinding(unsigned Binding) const {
setIsBindingSet();
- if (getType() == ELF::STT_SECTION && Binding != ELF::STB_LOCAL)
- setType(ELF::STT_NOTYPE);
unsigned Val;
switch (Binding) {
default:
@@ -93,8 +91,6 @@ unsigned MCSymbolELF::getBinding() const {
void MCSymbolELF::setType(unsigned Type) const {
unsigned Val;
- if (Type == ELF::STT_SECTION && getBinding() != ELF::STB_LOCAL)
- return;
switch (Type) {
default:
llvm_unreachable("Unsupported Binding");
OpenPOWER on IntegriCloud