Skip to content

Commit e0ab36a

Browse files
committed
Add a comment mentioning LTO/PGO
1 parent 87347af commit e0ab36a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

collector/src/artifact_stats.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ impl ArtifactStats {
112112
/// `foo::abcd` -> `foo`.
113113
/// - Removes suffixes after a dot from the symbol, e.g. `anon.abcdef.123` -> `anon` or
114114
/// `foo.llvm.123` -> `foo`.
115+
///
116+
/// These modifications should remove things added by LLVM in the LTO/PGO phase.
117+
/// See more information here: https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html#vendor-specific-suffix
115118
fn normalize_symbol_name(symbol: &str) -> String {
116119
/// Tries to match hashes in brackets produces by rustc in mangled symbol names.
117120
static RUSTC_BRACKET_HASH_REGEX: OnceLock<Regex> = OnceLock::new();
@@ -313,7 +316,7 @@ mod tests {
313316

314317
#[test]
315318
fn normalize_hash_without_brackets() {
316-
// Check that hashes withouto brackets are removed.
319+
// Check that hashes without brackets are removed.
317320
check(
318321
"_ZN10proc_macro5quote5quote28_$u7b$$u7b$closure$u7d$$u7d$17h90045007b0e69fc9E",
319322
"proc_macro::quote::quote::{{closure}}::h90045007b0e69fc9",

0 commit comments

Comments
 (0)