Factor File::addAtom out to MutableFile::addAtom.

This removes a bunch of llvm_unreachables and makes a File's mutability part of the type system.

llvm-svn: 172297
diff --git a/lld/lib/ReaderWriter/ELF/ReaderELF.cpp b/lld/lib/ReaderWriter/ELF/ReaderELF.cpp
index c6553c5..f40dacc 100644
--- a/lld/lib/ReaderWriter/ELF/ReaderELF.cpp
+++ b/lld/lib/ReaderWriter/ELF/ReaderELF.cpp
@@ -209,6 +209,9 @@
         // Get the symbol's content:
         llvm::ArrayRef<uint8_t> symbolData;
         uint64_t contentSize;
+
+        // If the next symbol is at the same location
+
         if (si + 1 == se) {
           // if this is the last symbol, take up the remaining data.
           contentSize = (isCommon) ? 0
@@ -272,10 +275,6 @@
     }
   }
 
-  virtual void addAtom(const Atom&) {
-    llvm_unreachable("cannot add atoms to native .o files");
-  }
-
   virtual const atom_collection<DefinedAtom> &defined() const {
     return _definedAtoms;
   }