[lld] r300385 - [MachO/X86_64] Simplify isDataInCodeTransition().
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 18:50:51 PDT 2017
Author: davide
Date: Fri Apr 14 20:50:51 2017
New Revision: 300385
URL: http://llvm.org/viewvc/llvm-project?rev=300385&view=rev
Log:
[MachO/X86_64] Simplify isDataInCodeTransition().
Modified:
lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
Modified: lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp?rev=300385&r1=300384&r2=300385&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ArchHandler_x86.cpp Fri Apr 14 20:50:51 2017
@@ -118,14 +118,7 @@ public:
normalized::Relocations &relocs) override;
bool isDataInCodeTransition(Reference::KindValue refKind) override {
- switch (refKind) {
- case modeCode:
- case modeData:
- return true;
- default:
- return false;
- break;
- }
+ return refKind == modeCode || refKind == modeData;
}
Reference::KindValue dataInCodeTransitionStart(
More information about the llvm-commits
mailing list