about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorDan Robertson <dan@dlrobertson.com>2019-02-08 17:30:42 +0000
committerDan Robertson <dan@dlrobertson.com>2019-02-27 10:21:54 -0500
commit08bd4ff9987fc57215a2fe54c63da0e86d9e6fbf (patch)
tree35f5410433d1af5e6eff929cc4c1750dc43c9595 /src/librustc_codegen_llvm
parenta618ad6335f7cb70005884542f0548ef29f23b7e (diff)
downloadrust-08bd4ff9987fc57215a2fe54c63da0e86d9e6fbf.tar.gz
rust-08bd4ff9987fc57215a2fe54c63da0e86d9e6fbf.zip
Rename variadic to c_variadic
Function signatures with the `variadic` member set are actually
C-variadic functions. Make this a little more explicit by renaming the
`variadic` boolean value, `c_variadic`.
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/abi.rs10
-rw-r--r--src/librustc_codegen_llvm/debuginfo/type_names.rs2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_codegen_llvm/abi.rs b/src/librustc_codegen_llvm/abi.rs
index aea62360651..49c9555a2c6 100644
--- a/src/librustc_codegen_llvm/abi.rs
+++ b/src/librustc_codegen_llvm/abi.rs
@@ -422,7 +422,7 @@ impl<'tcx> FnTypeExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
 
         let mut inputs = sig.inputs();
         let extra_args = if sig.abi == RustCall {
-            assert!(!sig.variadic && extra_args.is_empty());
+            assert!(!sig.c_variadic && extra_args.is_empty());
 
             match sig.inputs().last().unwrap().sty {
                 ty::Tuple(ref tupled_arguments) => {
@@ -435,7 +435,7 @@ impl<'tcx> FnTypeExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
                 }
             }
         } else {
-            assert!(sig.variadic || extra_args.is_empty());
+            assert!(sig.c_variadic || extra_args.is_empty());
             extra_args
         };
 
@@ -531,7 +531,7 @@ impl<'tcx> FnTypeExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
             // If this is a C-variadic function, this is not the return value,
             // and there is one or more fixed arguments; ensure that the `VaList`
             // is ignored as an argument.
-            if sig.variadic {
+            if sig.c_variadic {
                 match (last_arg_idx, arg_idx) {
                     (Some(last_idx), Some(cur_idx)) if last_idx == cur_idx => {
                         let va_list_did = match cx.tcx.lang_items().va_list() {
@@ -589,7 +589,7 @@ impl<'tcx> FnTypeExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
             args: inputs.iter().chain(extra_args).enumerate().map(|(i, ty)| {
                 arg_of(ty, Some(i))
             }).collect(),
-            variadic: sig.variadic,
+            c_variadic: sig.c_variadic,
             conv,
         };
         fn_ty.adjust_for_abi(cx, sig.abi);
@@ -717,7 +717,7 @@ impl<'tcx> FnTypeExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
             llargument_tys.push(llarg_ty);
         }
 
-        if self.variadic {
+        if self.c_variadic {
             cx.type_variadic_func(&llargument_tys, llreturn_ty)
         } else {
             cx.type_func(&llargument_tys, llreturn_ty)
diff --git a/src/librustc_codegen_llvm/debuginfo/type_names.rs b/src/librustc_codegen_llvm/debuginfo/type_names.rs
index 176c9b8c542..8b218ab39d9 100644
--- a/src/librustc_codegen_llvm/debuginfo/type_names.rs
+++ b/src/librustc_codegen_llvm/debuginfo/type_names.rs
@@ -143,7 +143,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
                 output.pop();
             }
 
-            if sig.variadic {
+            if sig.c_variadic {
                 if !sig.inputs().is_empty() {
                     output.push_str(", ...");
                 } else {