diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2025-10-02 16:29:18 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2025-10-02 18:04:23 +1000 |
| commit | ecb831dcf4c28d3b66c9bce7aa4c3a8eb221fa5e (patch) | |
| tree | ee2cadc5688f27c82cde25757c3987bba3078ee7 /compiler/rustc_codegen_llvm/src/asm.rs | |
| parent | 42b384ec0dfcd528d99a4db0a337d9188a9eecaa (diff) | |
| download | rust-ecb831dcf4c28d3b66c9bce7aa4c3a8eb221fa5e.tar.gz rust-ecb831dcf4c28d3b66c9bce7aa4c3a8eb221fa5e.zip | |
Extract helper method `set_metadata_node`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/asm.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/asm.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs index cc09fa5b69b..93b1cf272ab 100644 --- a/compiler/rustc_codegen_llvm/src/asm.rs +++ b/compiler/rustc_codegen_llvm/src/asm.rs @@ -538,9 +538,7 @@ pub(crate) fn inline_asm_call<'ll>( bx.const_u64(u64::from(span.lo().to_u32()) | (u64::from(span.hi().to_u32()) << 32)), ) })); - let md = unsafe { llvm::LLVMMDNodeInContext2(bx.llcx, srcloc.as_ptr(), srcloc.len()) }; - let md = bx.get_metadata_value(md); - llvm::LLVMSetMetadata(call, kind, md); + bx.cx.set_metadata_node(call, kind, &srcloc); Some(call) } |
