]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_gcc/src/declare.rs
Rollup merge of #105120 - solid-rs:patch/kmc-solid/maintainance, r=thomcc
[rust.git] / compiler / rustc_codegen_gcc / src / declare.rs
index a619e2f77125243a062ca7617c098f7a2ca562c7..eae77508c973abe0c0f50ab70a5e1935bcba246f 100644 (file)
@@ -65,13 +65,13 @@ pub fn declare_private_global(&self, name: &str, ty: Type<'gcc>) -> LValue<'gcc>
         global
     }
 
-    pub fn declare_cfn(&self, name: &str, _fn_type: Type<'gcc>) -> RValue<'gcc> {
+    pub fn declare_entry_fn(&self, name: &str, _fn_type: Type<'gcc>, callconv: () /*llvm::CCallConv*/) -> RValue<'gcc> {
         // TODO(antoyo): use the fn_type parameter.
         let const_string = self.context.new_type::<u8>().make_pointer().make_pointer();
         let return_type = self.type_i32();
         let variadic = false;
         self.linkage.set(FunctionType::Exported);
-        let func = declare_raw_fn(self, name, () /*llvm::CCallConv*/, return_type, &[self.type_i32(), const_string], variadic);
+        let func = declare_raw_fn(self, name, callconv, return_type, &[self.type_i32(), const_string], variadic);
         // NOTE: it is needed to set the current_func here as well, because get_fn() is not called
         // for the main function.
         *self.current_func.borrow_mut() = Some(func);