@@ -46,6 +46,7 @@ fn noname() -> *const c_char {
4646
4747impl BackendTypes for Builder < ' _ , ' ll , ' tcx > {
4848 type Value = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Value ;
49+ type Switch = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Switch ;
4950 type BasicBlock = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: BasicBlock ;
5051 type Type = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Type ;
5152 type Funclet = <CodegenCx < ' ll , ' tcx > as BackendTypes >:: Funclet ;
@@ -165,7 +166,7 @@ impl ControlFlowBuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
165166 }
166167 }
167168
168- fn switch (
169+ fn switch_new (
169170 & mut self ,
170171 v : & ' ll Value ,
171172 else_llbb : & ' ll BasicBlock ,
@@ -176,12 +177,14 @@ impl ControlFlowBuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
176177 }
177178 }
178179
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 ) {
180181 unsafe {
181- llvm:: LLVMAddCase ( s, on_val, dest)
182+ llvm:: LLVMAddCase ( * s, on_val, dest)
182183 }
183184 }
184185
186+ fn switch_emit ( & mut self , _: & ' ll Value ) { }
187+
185188 fn unreachable ( & mut self ) {
186189 self . count_insn ( "unreachable" ) ;
187190 unsafe {
@@ -506,15 +509,15 @@ impl MemoryBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
506509 }
507510
508511 fn write_operand_repeatedly (
509- mut self ,
512+ & mut self ,
510513 cg_elem : OperandRef < ' tcx , & ' ll Value > ,
511514 count : u64 ,
512515 dest : PlaceRef < ' tcx , & ' ll Value > ,
513516 ) -> Self {
514517 let zero = self . const_usize ( 0 ) ;
515518 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 ;
518521
519522 let mut header_bx = self . build_sibling_block ( "repeat_loop_header" ) ;
520523 let mut body_bx = self . build_sibling_block ( "repeat_loop_body" ) ;
0 commit comments