@@ -46,6 +46,7 @@ fn noname() -> *const c_char {
46
46
47
47
impl BackendTypes for Builder < ' _ , ' ll , ' tcx > {
48
48
type Value = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Value ;
49
+ type Switch = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Switch ;
49
50
type BasicBlock = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: BasicBlock ;
50
51
type Type = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Type ;
51
52
type Funclet = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Funclet ;
@@ -165,7 +166,7 @@ impl ControlFlowBuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
165
166
}
166
167
}
167
168
168
- fn switch (
169
+ fn switch_new (
169
170
& mut self ,
170
171
v : & ' ll Value ,
171
172
else_llbb : & ' ll BasicBlock ,
@@ -176,12 +177,14 @@ impl ControlFlowBuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
176
177
}
177
178
}
178
179
179
- fn add_case ( & mut self , s : & ' ll Value , on_val : & ' ll Value , dest : & ' ll BasicBlock ) {
180
+ fn switch_add_case ( & mut self , s : & mut & ' ll Value , on_val : & ' ll Value , dest : & ' ll BasicBlock ) {
180
181
unsafe {
181
- llvm:: LLVMAddCase ( s, on_val, dest)
182
+ llvm:: LLVMAddCase ( * s, on_val, dest)
182
183
}
183
184
}
184
185
186
+ fn switch_emit ( & mut self , _: & ' ll Value ) { }
187
+
185
188
fn unreachable ( & mut self ) {
186
189
self . count_insn ( "unreachable" ) ;
187
190
unsafe {
@@ -506,15 +509,15 @@ impl MemoryBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
506
509
}
507
510
508
511
fn write_operand_repeatedly (
509
- mut self ,
512
+ & mut self ,
510
513
cg_elem : OperandRef < ' tcx , & ' ll Value > ,
511
514
count : u64 ,
512
515
dest : PlaceRef < ' tcx , & ' ll Value > ,
513
516
) -> Self {
514
517
let zero = self . const_usize ( 0 ) ;
515
518
let count = self . const_usize ( count) ;
516
- let start = dest. project_index ( & mut self , zero) . llval ;
517
- let end = dest. project_index ( & mut self , count) . llval ;
519
+ let start = dest. project_index ( self , zero) . llval ;
520
+ let end = dest. project_index ( self , count) . llval ;
518
521
519
522
let mut header_bx = self . build_sibling_block ( "repeat_loop_header" ) ;
520
523
let mut body_bx = self . build_sibling_block ( "repeat_loop_body" ) ;
0 commit comments