diff options
author | Rui Ueyama <ruiu@google.com> | 2016-08-08 19:39:45 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-08-08 19:39:45 +0000 |
commit | 7cf81a7304eaff2705d5c45c8f8476315d1a9151 (patch) | |
tree | 9dcd05bc457d00c96b915f4c0a30c8de868ce065 /lld/ELF/Writer.h | |
parent | be8ad76a2ee07ca075c8bc723c0669960cafc31a (diff) |
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
Diffstat (limited to 'lld/ELF/Writer.h')
-rw-r--r-- | lld/ELF/Writer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/Writer.h b/lld/ELF/Writer.h index 9e6e3671c40..9caf7a7a10e 100644 --- a/lld/ELF/Writer.h +++ b/lld/ELF/Writer.h @@ -45,6 +45,8 @@ template <class ELFT> llvm::StringRef getOutputSectionName(InputSectionBase<ELFT> *S); template <class ELFT> void reportDiscarded(InputSectionBase<ELFT> *IS); + +template <class ELFT> uint32_t getMipsEFlags(); } } |