diff --git a/compiler/section_mangler/src/lib.rs b/compiler/section_mangler/src/lib.rs index 05ffea5706..6e67855320 100644 --- a/compiler/section_mangler/src/lib.rs +++ b/compiler/section_mangler/src/lib.rs @@ -77,6 +77,13 @@ impl SectionMangler { SectionMangler::Variable(VariableMangler { name: name.into(), ty }) } + pub fn name(&self) -> &str { + match self { + SectionMangler::Function(FunctionMangler { name, .. }) + | SectionMangler::Variable(VariableMangler { name, .. }) => name, + } + } + pub fn with_parameter(self, param: FunctionArgument) -> SectionMangler { match self { SectionMangler::Function(f) => {