diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-04-14 07:19:29 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-04-14 07:19:29 +0000 |
| commit | ff499469e0fa4a7f19082d7efe3b1a1f94631be1 (patch) | |
| tree | 714324ec487ed48b3b79415ef9ad5d0f73609103 | |
| parent | 707504e0f2a85e25c95cb5b43f08cc4ba6b7c6cf (diff) | |
| download | bcm5719-llvm-ff499469e0fa4a7f19082d7efe3b1a1f94631be1.tar.gz bcm5719-llvm-ff499469e0fa4a7f19082d7efe3b1a1f94631be1.zip | |
Simplify short switch-cases.
llvm-svn: 234869
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h index 0097950427c..ab91e405fd5 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h @@ -41,12 +41,7 @@ public: bool isPLTRelocation(const Reference &r) const override { if (r.kindNamespace() != Reference::KindNamespace::ELF) return false; - switch (r.kindValue()) { - case llvm::ELF::R_HEX_JMP_SLOT: - return true; - default: - return false; - } + return r.kindValue() == llvm::ELF::R_HEX_JMP_SLOT; } /// \brief Hexagon has only one relative relocation @@ -54,12 +49,7 @@ public: bool isRelativeReloc(const Reference &r) const override { if (r.kindNamespace() != Reference::KindNamespace::ELF) return false; - switch (r.kindValue()) { - case llvm::ELF::R_HEX_RELATIVE: - return true; - default: - return false; - } + return r.kindValue() == llvm::ELF::R_HEX_RELATIVE; } }; |

