diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-11-25 11:43:18 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-11-25 11:43:18 +0100 |
| commit | efdbd88a741074a799563ef08c96ff92905fbc1c (patch) | |
| tree | 1dc18ff1522e2e5c2677289e38447c137fdf825b | |
| parent | 8714be0ad3cb416e146c4bc5f674d49a7d13af68 (diff) | |
| download | rust-efdbd88a741074a799563ef08c96ff92905fbc1c.tar.gz rust-efdbd88a741074a799563ef08c96ff92905fbc1c.zip | |
Ensure inline asm wrapper name never starts with a digit
This could previously happen if the cgu name starts with a digit
| -rw-r--r-- | src/inline_asm.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inline_asm.rs b/src/inline_asm.rs index 1a670c475c7..ba2699316da 100644 --- a/src/inline_asm.rs +++ b/src/inline_asm.rs @@ -124,7 +124,7 @@ pub(crate) fn codegen_inline_asm<'tcx>( let inline_asm_index = fx.cx.inline_asm_index.get(); fx.cx.inline_asm_index.set(inline_asm_index + 1); let asm_name = - format!("{}__inline_asm_{}", fx.cx.cgu_name.as_str().replace('.', "__").replace('-', "_"), inline_asm_index); + format!("__inline_asm_{}_n{}", fx.cx.cgu_name.as_str().replace('.', "__").replace('-', "_"), inline_asm_index); let generated_asm = asm_gen.generate_asm_wrapper(&asm_name); fx.cx.global_asm.push_str(&generated_asm); |
