Do not generate '@' character in symbol names.
MSP430 assembler does not like '@' character in symbol names, so we should only use alphanumerics when we generate a new name. Fixes #38116
This commit is contained in:
parent
b4b1e5ece2
commit
9d764fc3c1
2 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,8 @@
|
|||
use std::str;
|
||||
|
||||
pub const MAX_BASE: u64 = 64;
|
||||
pub const ALPHANUMERIC_ONLY: u64 = 62;
|
||||
|
||||
const BASE_64: &'static [u8; MAX_BASE as usize] =
|
||||
b"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@$";
|
||||
|
||||
|
|
|
@ -971,7 +971,7 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
|
|||
let mut name = String::with_capacity(prefix.len() + 6);
|
||||
name.push_str(prefix);
|
||||
name.push_str(".");
|
||||
base_n::push_str(idx as u64, base_n::MAX_BASE, &mut name);
|
||||
base_n::push_str(idx as u64, base_n::ALPHANUMERIC_ONLY, &mut name);
|
||||
name
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue