Skip to content

Commit 771d3b4

Browse files
committed
Handle @-symbols with ThinLTO symbols
Looks like this comes up for some ABIs on Windows so stripping `@` or otherwise ignoring it should help us recognize more symbols.
1 parent cd264ca commit 771d3b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub fn demangle(mut s: &str) -> Demangle {
8989
let candidate = &s[i + llvm.len()..];
9090
let all_hex = candidate.chars().all(|c| {
9191
match c {
92-
'A' ... 'F' | '0' ... '9' => true,
92+
'A' ... 'F' | '0' ... '9' | '@' => true,
9393
_ => false,
9494
}
9595
});
@@ -395,6 +395,7 @@ mod tests {
395395
fn demangle_thinlto() {
396396
// One element, no hash.
397397
t!("_ZN3fooE.llvm.9D1C9369", "foo");
398+
t!("_ZN3fooE.llvm.9D1C9369@@16", "foo");
398399
t_nohash!("_ZN9backtrace3foo17hbb467fcdaea5d79bE.llvm.A5310EB9", "backtrace::foo");
399400
}
400401

0 commit comments

Comments
 (0)