From b166ccbea800df610668b2562a5867211cac577e Mon Sep 17 00:00:00 2001 From: Facebook Github Bot Date: Thu, 4 Oct 2018 10:46:16 -0700 Subject: [PATCH] [BOLT][PR] Fix compiler warnings in BinaryContext and RegAnalysis Summary: This pull request fixes two compiler warnings: - missing `break;` in a switch-case statement in RegAnalysis.cpp (-Wimplicit-fallthrough warning) - misleading indentation in BinaryContext.cpp (-Wmisleading-indentation warning) Pull Request resolved: https://github.com/facebookincubator/BOLT/pull/39 GitHub Author: Andreas Ziegler (cherry picked from FBD10202092) --- bolt/src/BinaryContext.cpp | 6 +++--- bolt/src/Passes/RegAnalysis.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bolt/src/BinaryContext.cpp b/bolt/src/BinaryContext.cpp index 9751a951e6df..4359f074abde 100644 --- a/bolt/src/BinaryContext.cpp +++ b/bolt/src/BinaryContext.cpp @@ -872,11 +872,11 @@ void BinaryContext::printInstruction(raw_ostream &OS, OS << " # TAILCALL "; if (MIB->isInvoke(Instruction)) { if (const auto EHInfo = MIB->getEHInfo(Instruction)) { - OS << " # handler: "; + OS << " # handler: "; if (EHInfo->first) OS << *EHInfo->first; - else - OS << '0'; + else + OS << '0'; OS << "; action: " << EHInfo->second; } auto GnuArgsSize = MIB->getGnuArgsSize(Instruction); diff --git a/bolt/src/Passes/RegAnalysis.cpp b/bolt/src/Passes/RegAnalysis.cpp index 14ef48b57c25..5a52fae8a2ee 100644 --- a/bolt/src/Passes/RegAnalysis.cpp +++ b/bolt/src/Passes/RegAnalysis.cpp @@ -105,6 +105,7 @@ void RegAnalysis::beConservative(BitVector &Result) const { BC.MIB->getCalleeSavedRegs(BV); BV.flip(); Result |= BV; + break; } case ConservativeStrategy::CLOBBERS_NONE: Result.reset();