Skip to content

Commit d25db94

Browse files
committed
[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.
1 parent 7e0fd77 commit d25db94

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

llvm/lib/MC/MCSymbolELF.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ enum {
4040

4141
void MCSymbolELF::setBinding(unsigned Binding) const {
4242
setIsBindingSet();
43-
if (getType() == ELF::STT_SECTION && Binding != ELF::STB_LOCAL)
44-
setType(ELF::STT_NOTYPE);
4543
unsigned Val;
4644
switch (Binding) {
4745
default:
@@ -93,8 +91,6 @@ unsigned MCSymbolELF::getBinding() const {
9391

9492
void MCSymbolELF::setType(unsigned Type) const {
9593
unsigned Val;
96-
if (Type == ELF::STT_SECTION && getBinding() != ELF::STB_LOCAL)
97-
return;
9894
switch (Type) {
9995
default:
10096
llvm_unreachable("Unsupported Binding");

0 commit comments

Comments
 (0)