[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 <andreas.ziegler@fau.de>

(cherry picked from FBD10202092)
This commit is contained in:
Facebook Github Bot
2018-10-04 10:46:16 -07:00
committed by Maksim Panchenko
parent c3c80822a3
commit b166ccbea8
2 changed files with 4 additions and 3 deletions

View File

@@ -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);

View File

@@ -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();