1
Fork 0

codegen_llvm/misc: whitespace & formatting improvements

This commit is contained in:
ljedrz 2018-10-09 15:13:11 +02:00
parent b1a137d015
commit 8efd9dd81b
5 changed files with 46 additions and 45 deletions

View file

@ -213,7 +213,8 @@ impl FunctionCx<'a, 'll, 'tcx> {
} else {
let (otherwise, targets) = targets.split_last().unwrap();
let switch = bx.switch(discr.immediate(),
llblock(self, *otherwise), values.len());
llblock(self, *otherwise),
values.len());
let switch_llty = bx.cx.layout_of(switch_ty).immediate_llvm_type(bx.cx);
for (&value, target) in values.iter().zip(targets) {
let llval = C_uint_big(switch_llty, value);