Refactor getMipsEFlags.
authorRui Ueyama <ruiu@google.com>
Mon, 8 Aug 2016 19:39:45 +0000 (19:39 +0000)
committerRui Ueyama <ruiu@google.com>
Mon, 8 Aug 2016 19:39:45 +0000 (19:39 +0000)
commit31f32fa62aab473aa58291af0a6984aa1a36f2ee
tree072f177f8d8d17290f91c8ae366f7deaeba04cbd
parent75331f7f2e31009798bafad00478a851dd25a250
Refactor getMipsEFlags.

Previously, we incrementally updated the reuslting flag as we check
file flags, so it was not very clear who is updating what flags.
This patch makes them pure functions -- that has no side effect and
don't update arguments to improve readability.

Now each function construct a patial result, and all resutls are then
bitwise-OR'ed to construct the final result.

This patch also creates a new file, Mips.cpp, to move all these
MIPS functions to a separate file.

Differential Revision: https://reviews.llvm.org/D23249

llvm-svn: 278042
lld/ELF/CMakeLists.txt
lld/ELF/Mips.cpp [new file with mode: 0644]
lld/ELF/Writer.cpp
lld/ELF/Writer.h
lld/test/ELF/mips-elf-flags-err.s