Skip to content

Commit 9eb1f76

Browse files
committed
Fix empty mangling handling on OSX
1 parent f967825 commit 9eb1f76

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ir/function.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,16 @@ pub fn cursor_mangling(cursor: &clang::Cursor) -> Option<String> {
9898
}
9999

100100
let mut mangling = cursor.mangling();
101+
if mangling.is_empty() {
102+
return None;
103+
}
101104

102105
// Try to undo backend linkage munging (prepended _, generally)
103106
if cfg!(target_os = "macos") {
104107
mangling.remove(0);
105108
}
106109

107-
if mangling.is_empty() { None } else { Some(mangling) }
110+
Some(mangling)
108111
}
109112

110113
impl FunctionSig {

0 commit comments

Comments
 (0)