From 46ff186b2938c089ffa05f1999d63ed3a4583411 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 1 Nov 2018 19:36:29 +0000 Subject: [codeview] Add breaks to fix -Wimplicit-fallthrough This is a minor bug fix. Previously, if you tried to encode the RSP register on the x86 platform, that might have succeeded and been encoded incorrectly. However, no existing producer or consumer passes the x86_64 registers when targeting x86_32. llvm-svn: 345879 --- llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/DebugInfo') diff --git a/llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp b/llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp index e73c69fff44..2af8205cebc 100644 --- a/llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp +++ b/llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp @@ -529,6 +529,7 @@ EncodedFramePtrReg codeview::encodeFramePtrReg(RegisterId Reg, CPUType CPU) { default: break; } + break; case CPUType::X64: switch (Reg) { case RegisterId::RSP: @@ -540,6 +541,7 @@ EncodedFramePtrReg codeview::encodeFramePtrReg(RegisterId Reg, CPUType CPU) { default: break; } + break; } return EncodedFramePtrReg::None; } -- cgit v1.2.3