diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-09 09:48:46 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-14 08:27:08 +0000 |
| commit | 7f95f042677f86df55da58cdebe9ce31a1e928a8 (patch) | |
| tree | 41017783d171c58ae47eed3328f17b545fe6342d /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | 56d22cd29ff6d3ea1fa8972462ad94792960b1ef (diff) | |
| download | rust-7f95f042677f86df55da58cdebe9ce31a1e928a8.tar.gz rust-7f95f042677f86df55da58cdebe9ce31a1e928a8.zip | |
Eliminate all direct uses of LLVMMDStringInContext2
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 3c64cb79d5e..514923ad6f3 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -302,8 +302,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { return; } - let id_str = "branch_weights"; - let id = self.cx.create_metadata(id_str.into()); + let id = self.cx.create_metadata(b"branch_weights"); // For switch instructions with 2 targets, the `llvm.expect` intrinsic is used. // This function handles switch instructions with more than 2 targets and it needs to @@ -1718,7 +1717,7 @@ impl<'a, 'll, 'tcx> Builder<'a, 'll, 'tcx> { } else { cfi::typeid_for_fnabi(self.tcx, fn_abi, options) }; - let typeid_metadata = self.cx.create_metadata(typeid); + let typeid_metadata = self.cx.create_metadata(typeid.as_bytes()); let dbg_loc = self.get_dbg_loc(); // Test whether the function pointer is associated with the type identifier using the |
