[llvm-commits] [PATCH] [lld] Factor File::addAtom out to MutableFile::addAtom.

Nick Kledzik kledzik at apple.com
Wed Jan 9 16:40:46 PST 2013


Is it worth it to introduce a new class just to get rid of some llvm_unreachables?  

The mutability was already enforced via const.  That is, only a non-const File could have its addAtoms() method called.  

-Nick

On Jan 9, 2013, at 12:43 PM, Michael Spencer wrote:
> Hi kledzik,
> 
> This removes a bunch of llvm_unreachables and makes a File's mutability part of the type system.
> 
> 
> http://llvm-reviews.chandlerc.com/D274
> 
> Files:
>  include/lld/Core/File.h
>  include/lld/Core/Pass.h
>  include/lld/Core/Resolver.h
>  lib/Passes/GOTPass.cpp
>  lib/Passes/StubsPass.cpp
>  lib/ReaderWriter/ELF/ReaderELF.cpp
>  lib/ReaderWriter/MachO/StubsPass.hpp
>  lib/ReaderWriter/Native/ReaderNative.cpp
>  lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
>  lib/ReaderWriter/ReaderArchive.cpp
>  lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
>  tools/lld-core/TestingHelpers.hpp
>  tools/lld-core/lld-core.cpp
> <D274.1.patch>




More information about the llvm-commits mailing list