summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h14
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;
}
};
OpenPOWER on IntegriCloud