[llvm] c9797cf - Fix msvc "switch statement contains 'default' but no 'case' labels" warning. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri May 22 02:51:31 PDT 2020
Author: Simon Pilgrim
Date: 2020-05-22T10:49:10+01:00
New Revision: c9797cf98b7a86dca036cea479a2566e3b0768ff
URL: https://github.com/llvm/llvm-project/commit/c9797cf98b7a86dca036cea479a2566e3b0768ff
DIFF: https://github.com/llvm/llvm-project/commit/c9797cf98b7a86dca036cea479a2566e3b0768ff.diff
LOG: Fix msvc "switch statement contains 'default' but no 'case' labels" warning. NFC.
Stripped out the switch statement, but kept case labels as comments for future reference.
Added:
Modified:
llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
index 5fd3af03ea6d..cc7a7e2ca9cc 100644
--- a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
@@ -352,31 +352,28 @@ void jitLink_ELF_x86_64(std::unique_ptr<JITLinkContext> Ctx) {
}
StringRef getELFX86RelocationKindName(Edge::Kind R) {
- switch (R) {
- // case R_AMD64_NONE:
- // return "None";
- // case R_AMD64_PC32:
- // case R_AMD64_GOT32:
- // caseR_AMD64_PLT32,
- // R_AMD64_COPY,
- // R_AMD64_GLOB_DAT,
- // R_AMD64_JUMP_SLOT,
- // R_AMD64_RELATIVE,
- // R_AMD64_GOTPCREL,
- // R_AMD64_32,
- // R_AMD64_32S,
- // R_AMD64_16,
- // R_AMD64_PC16,
- // R_AMD64_8,
- // R_AMD64_PC8,
- // R_AMD64_PC64,
- // R_AMD64_GOTOFF64,
- // R_AMD64_GOTPC32,
- // R_AMD64_SIZE32,
- // R_AMD64_SIZE64
- default:
- return getGenericEdgeKindName(static_cast<Edge::Kind>(R));
- }
+ // case R_AMD64_NONE:
+ // return "None";
+ // case R_AMD64_PC32:
+ // case R_AMD64_GOT32:
+ // case R_AMD64_PLT32,
+ // R_AMD64_COPY,
+ // R_AMD64_GLOB_DAT,
+ // R_AMD64_JUMP_SLOT,
+ // R_AMD64_RELATIVE,
+ // R_AMD64_GOTPCREL,
+ // R_AMD64_32,
+ // R_AMD64_32S,
+ // R_AMD64_16,
+ // R_AMD64_PC16,
+ // R_AMD64_8,
+ // R_AMD64_PC8,
+ // R_AMD64_PC64,
+ // R_AMD64_GOTOFF64,
+ // R_AMD64_GOTPC32,
+ // R_AMD64_SIZE32,
+ // R_AMD64_SIZE64
+ return getGenericEdgeKindName(static_cast<Edge::Kind>(R));
}
} // end namespace jitlink
} // end namespace llvm
More information about the llvm-commits
mailing list