Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit efdbd88

Browse files
committed
Ensure inline asm wrapper name never starts with a digit
This could previously happen if the cgu name starts with a digit
1 parent 8714be0 commit efdbd88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inline_asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub(crate) fn codegen_inline_asm<'tcx>(
124124
let inline_asm_index = fx.cx.inline_asm_index.get();
125125
fx.cx.inline_asm_index.set(inline_asm_index + 1);
126126
let asm_name =
127-
format!("{}__inline_asm_{}", fx.cx.cgu_name.as_str().replace('.', "__").replace('-', "_"), inline_asm_index);
127+
format!("__inline_asm_{}_n{}", fx.cx.cgu_name.as_str().replace('.', "__").replace('-', "_"), inline_asm_index);
128128

129129
let generated_asm = asm_gen.generate_asm_wrapper(&asm_name);
130130
fx.cx.global_asm.push_str(&generated_asm);

0 commit comments

Comments
 (0)