diff --git a/spirv_msl.cpp b/spirv_msl.cpp index 004c56f5..e44b84b1 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -5368,9 +5368,10 @@ void CompilerMSL::emit_function_prototype(SPIRFunction &func, const Bitset &) add_function_overload(func); local_variable_names = resource_names; - string decl; processing_entry_point = (func.self == ir.default_entry_point); + + string decl = processing_entry_point ? "" : "inline "; auto &type = get(func.return_type); @@ -5381,7 +5382,7 @@ void CompilerMSL::emit_function_prototype(SPIRFunction &func, const Bitset &) else { // We cannot return arrays in MSL, so "return" through an out variable. - decl = "void"; + decl += "void"; } decl += " ";