Make some "safe" llvm ops actually sound

This commit is contained in:
Oli Scherer
2025-07-10 07:27:41 +00:00
parent 6b3ae3f6e4
commit 84eeca2e2f
4 changed files with 9 additions and 7 deletions

View File

@@ -430,7 +430,7 @@ impl<'ll> CodegenCx<'ll, '_> {
// specific rules on what can be cast. So instead of adding a new way to
// generate static initializers that match the static's type, we picked
// the easier option and retroactively change the type of the static item itself.
let name = llvm::get_value_name(g).to_vec();
let name = llvm::get_value_name(g);
llvm::set_value_name(g, b"");
let linkage = llvm::get_linkage(g);