Fix cpplint readability/braces issues
Change-Id: I56b88956510077b0e13aad4caee8898313fab55b
diff --git a/compiler/dex/quick/arm/utility_arm.cc b/compiler/dex/quick/arm/utility_arm.cc
index f2317f3..f41f110 100644
--- a/compiler/dex/quick/arm/utility_arm.cc
+++ b/compiler/dex/quick/arm/utility_arm.cc
@@ -329,16 +329,17 @@
break;
}
DCHECK_GE(static_cast<int>(opcode), 0);
- if (EncodingMap[opcode].flags & IS_BINARY_OP)
+ if (EncodingMap[opcode].flags & IS_BINARY_OP) {
return NewLIR2(opcode, r_dest_src1, r_src2);
- else if (EncodingMap[opcode].flags & IS_TERTIARY_OP) {
- if (EncodingMap[opcode].field_loc[2].kind == kFmtShift)
+ } else if (EncodingMap[opcode].flags & IS_TERTIARY_OP) {
+ if (EncodingMap[opcode].field_loc[2].kind == kFmtShift) {
return NewLIR3(opcode, r_dest_src1, r_src2, shift);
- else
+ } else {
return NewLIR3(opcode, r_dest_src1, r_dest_src1, r_src2);
- } else if (EncodingMap[opcode].flags & IS_QUAD_OP)
+ }
+ } else if (EncodingMap[opcode].flags & IS_QUAD_OP) {
return NewLIR4(opcode, r_dest_src1, r_dest_src1, r_src2, shift);
- else {
+ } else {
LOG(FATAL) << "Unexpected encoding operand count";
return NULL;
}
@@ -406,9 +407,9 @@
break;
}
DCHECK_GE(static_cast<int>(opcode), 0);
- if (EncodingMap[opcode].flags & IS_QUAD_OP)
+ if (EncodingMap[opcode].flags & IS_QUAD_OP) {
return NewLIR4(opcode, r_dest, r_src1, r_src2, shift);
- else {
+ } else {
DCHECK(EncodingMap[opcode].flags & IS_TERTIARY_OP);
return NewLIR3(opcode, r_dest, r_src1, r_src2);
}
@@ -565,11 +566,11 @@
}
break;
case kOpCmp:
- if (ARM_LOWREG(r_dest_src1) && short_form)
+ if (ARM_LOWREG(r_dest_src1) && short_form) {
opcode = (short_form) ? kThumbCmpRI8 : kThumbCmpRR;
- else if (ARM_LOWREG(r_dest_src1))
+ } else if (ARM_LOWREG(r_dest_src1)) {
opcode = kThumbCmpRR;
- else {
+ } else {
short_form = false;
opcode = kThumbCmpHL;
}
@@ -579,9 +580,9 @@
short_form = false;
break;
}
- if (short_form)
+ if (short_form) {
return NewLIR2(opcode, r_dest_src1, abs_value);
- else {
+ } else {
return OpRegRegImm(op, r_dest_src1, r_dest_src1, value);
}
}
diff --git a/compiler/dex/quick/mips/utility_mips.cc b/compiler/dex/quick/mips/utility_mips.cc
index b7546b7..79f6f16 100644
--- a/compiler/dex/quick/mips/utility_mips.cc
+++ b/compiler/dex/quick/mips/utility_mips.cc
@@ -145,9 +145,9 @@
LOG(FATAL) << "Bad case in OpRegImm";
break;
}
- if (short_form)
+ if (short_form) {
res = NewLIR2(opcode, r_dest_src1, abs_value);
- else {
+ } else {
int r_scratch = AllocTemp();
res = LoadConstant(r_scratch, value);
if (op == kOpCmp)
@@ -267,9 +267,9 @@
break;
}
- if (short_form)
+ if (short_form) {
res = NewLIR3(opcode, r_dest, r_src1, value);
- else {
+ } else {
if (r_dest != r_src1) {
res = LoadConstant(r_dest, value);
NewLIR3(opcode, r_dest, r_src1, r_dest);
diff --git a/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h
index 7765eaa..0962167 100644
--- a/compiler/dex/quick/mir_to_lir.h
+++ b/compiler/dex/quick/mir_to_lir.h
@@ -225,7 +225,7 @@
bool first_in_pair;
};
- virtual ~Mir2Lir() {};
+ virtual ~Mir2Lir() {}
int32_t s4FromSwitchData(const void* switch_data) {
return *reinterpret_cast<const int32_t*>(switch_data);