Skip to content

Commit c45a9b9

Browse files
committed
Remove va_arg from cg_ssa
1 parent 6a92455 commit c45a9b9

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/librustc_codegen_llvm/builder.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -1136,14 +1136,6 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
11361136
}
11371137
}
11381138

1139-
#[allow(dead_code)]
1140-
fn va_arg(&mut self, list: &'ll Value, ty: &'ll Type) -> &'ll Value {
1141-
self.count_insn("vaarg");
1142-
unsafe {
1143-
llvm::LLVMBuildVAArg(self.llbuilder, list, ty, noname())
1144-
}
1145-
}
1146-
11471139
fn extract_element(&mut self, vec: &'ll Value, idx: &'ll Value) -> &'ll Value {
11481140
self.count_insn("extractelement");
11491141
unsafe {
@@ -1514,4 +1506,11 @@ impl Builder<'a, 'll, 'tcx> {
15141506
llvm::LLVMAddIncoming(phi, &val, &bb, 1 as c_uint);
15151507
}
15161508
}
1509+
1510+
crate fn va_arg(&mut self, list: &'ll Value, ty: &'ll Type) -> &'ll Value {
1511+
self.count_insn("vaarg");
1512+
unsafe {
1513+
llvm::LLVMBuildVAArg(self.llbuilder, list, ty, noname())
1514+
}
1515+
}
15171516
}

src/librustc_codegen_ssa/traits/builder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ pub trait BuilderMethods<'a, 'tcx: 'a>:
262262
else_val: Self::Value,
263263
) -> Self::Value;
264264

265-
fn va_arg(&mut self, list: Self::Value, ty: Self::Type) -> Self::Value;
266265
fn extract_element(&mut self, vec: Self::Value, idx: Self::Value) -> Self::Value;
267266
fn vector_splat(&mut self, num_elts: usize, elt: Self::Value) -> Self::Value;
268267
fn extract_value(&mut self, agg_val: Self::Value, idx: u64) -> Self::Value;

0 commit comments

Comments
 (0)