1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[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.
This commit is contained in:
Fangrui Song 2019-12-15 20:32:08 -08:00
parent c564824e50
commit aad5517504

View File

@ -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");