Skip to content

Commit 2314f66

Browse files
committed
section_mangler: Add .name() method
1 parent 48b88b4 commit 2314f66

File tree

1 file changed

+7
-0
lines changed
  • compiler/section_mangler/src

1 file changed

+7
-0
lines changed

compiler/section_mangler/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ impl SectionMangler {
7777
SectionMangler::Variable(VariableMangler { name: name.into(), ty })
7878
}
7979

80+
pub fn name(&self) -> &str {
81+
match self {
82+
SectionMangler::Function(FunctionMangler { name, .. })
83+
| SectionMangler::Variable(VariableMangler { name, .. }) => name,
84+
}
85+
}
86+
8087
pub fn with_parameter(self, param: FunctionArgument) -> SectionMangler {
8188
match self {
8289
SectionMangler::Function(f) => {

0 commit comments

Comments
 (0)