From c9797cf98b7a86dca036cea479a2566e3b0768ff Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 22 May 2020 10:47:12 +0100 Subject: [PATCH] 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. --- .../ExecutionEngine/JITLink/ELF_x86_64.cpp | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) 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 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(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(R)); } } // end namespace jitlink } // end namespace llvm