@@ -138,7 +138,7 @@ pub fn finalize(cx: @mut CrateContext) {
138
138
pub fn create_local_var_metadata ( bcx : @mut Block , local : & ast:: Local ) {
139
139
let cx = bcx. ccx ( ) ;
140
140
let def_map = cx. tcx . def_map ;
141
- let pattern = local. node . pat ;
141
+ let pattern = local. pat ;
142
142
143
143
let scope = match bcx. parent {
144
144
None => create_function_metadata ( bcx. fcx ) ,
@@ -157,7 +157,7 @@ pub fn create_local_var_metadata(bcx: @mut Block, local: &ast::Local) {
157
157
let ty = node_id_type ( bcx, node_id) ;
158
158
let type_metadata = type_metadata ( cx, ty, span) ;
159
159
160
- let var_metadata = do as_c_str ( name) |name| {
160
+ let var_metadata = do name. as_c_str |name| {
161
161
unsafe {
162
162
llvm:: LLVMDIBuilderCreateLocalVariable (
163
163
DIB ( cx) ,
@@ -188,7 +188,7 @@ pub fn create_local_var_metadata(bcx: @mut Block, local: &ast::Local) {
188
188
var_metadata,
189
189
bcx. llbb ) ;
190
190
191
- llvm:: LLVMSetInstDebugLocation ( trans:: build:: B ( bcx) , instr) ;
191
+ llvm:: LLVMSetInstDebugLocation ( trans:: build:: B ( bcx) . llbuilder , instr) ;
192
192
}
193
193
}
194
194
}
@@ -227,7 +227,7 @@ pub fn create_argument_metadata(bcx: @mut Block, arg: &ast::arg, span: span) {
227
227
let name: & str = cx. sess . str_of ( ident) ;
228
228
debug ! ( "create_argument_metadata: %s" , name) ;
229
229
230
- let arg_metadata = do as_c_str ( name) |name| {
230
+ let arg_metadata = do name. as_c_str |name| {
231
231
unsafe {
232
232
llvm:: LLVMDIBuilderCreateLocalVariable (
233
233
DIB ( cx) ,
@@ -260,7 +260,7 @@ pub fn create_argument_metadata(bcx: @mut Block, arg: &ast::arg, span: span) {
260
260
arg_metadata,
261
261
bcx. llbb ) ;
262
262
263
- llvm:: LLVMSetInstDebugLocation ( trans:: build:: B ( bcx) , instr) ;
263
+ llvm:: LLVMSetInstDebugLocation ( trans:: build:: B ( bcx) . llbuilder , instr) ;
264
264
}
265
265
}
266
266
@@ -623,8 +623,6 @@ fn tuple_metadata(cx: &mut CrateContext,
623
623
fn enum_metadata ( cx : & mut CrateContext ,
624
624
enum_type : ty:: t ,
625
625
enum_def_id : ast:: def_id ,
626
- // _substs is only needed in the other version. Will go away with new snapshot.
627
- _substs : & ty:: substs ,
628
626
span : span )
629
627
-> DIType {
630
628
@@ -1128,8 +1126,8 @@ fn type_metadata(cx: &mut CrateContext,
1128
1126
}
1129
1127
}
1130
1128
} ,
1131
- ty:: ty_enum( def_id, ref substs ) => {
1132
- enum_metadata ( cx, t, def_id, substs , span)
1129
+ ty:: ty_enum( def_id, _ ) => {
1130
+ enum_metadata ( cx, t, def_id, span)
1133
1131
} ,
1134
1132
ty:: ty_box( ref mt) => {
1135
1133
create_pointer_to_box_metadata ( cx, t, mt. ty )
0 commit comments