Skip to content

Commit c97ac05

Browse files
committed
Only strip the prefix _ on macos; windows needs it on gnu as well
1 parent 89e2725 commit c97ac05

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/parser.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,10 @@ impl<'a> ClangParserCtx<'a> {
6868
}
6969
}
7070

71-
fn cursor_link_name(ctx: &mut ClangParserCtx, cursor: &Cursor) -> String {
72-
let mut mangling = cursor.mangling();
73-
71+
fn cursor_link_name(_: &mut ClangParserCtx, cursor: &Cursor) -> String {
7472
// Try to undo backend linkage munging (prepended _, generally)
75-
if cfg!(target_os = "macos") ||
76-
(cfg!(target_os = "windows") && !ctx.options.msvc_mangling)
77-
{
73+
let mut mangling = cursor.mangling();
74+
if cfg!(target_os = "macos") {
7875
mangling.remove(0);
7976
}
8077
mangling

0 commit comments

Comments
 (0)