[ELF2] Writer: Fold variables, use setVisibility(). NFCI.

llvm-svn: 246861
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 48abf2d..1adbb2e 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -327,12 +327,9 @@
       break;
     }
 
-    uint8_t Type = InputSym.getType();
-    uint8_t Binding = InputSym.getBinding();
-    ESym->setBindingAndType(Binding, Type);
+    ESym->setBindingAndType(InputSym.getBinding(), InputSym.getType());
     ESym->st_size = InputSym.st_size;
-    uint8_t Other = InputSym.st_other;
-    ESym->st_other = (Other & ~0x3) | Body->getMostConstrainingVisibility();
+    ESym->setVisibility(Body->getMostConstrainingVisibility());
     if (InputSym.isAbsolute()) {
       ESym->st_shndx = SHN_ABS;
       ESym->st_value = InputSym.st_value;