We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31d754a commit 0247c6aCopy full SHA for 0247c6a
compiler/rustc_codegen_llvm/src/consts.rs
@@ -241,7 +241,14 @@ impl<'ll> CodegenCx<'ll, '_> {
241
};
242
llvm::LLVMSetInitializer(gv, cv);
243
set_global_alignment(self, gv, align);
244
- llvm::SetUnnamedAddress(gv, llvm::UnnamedAddr::Global);
+
245
+ // Experiment: What's the impact of making vtables unmergable?
246
+ if kind == Some("vtable") {
247
+ llvm::SetUnnamedAddress(gv, llvm::UnnamedAddr::No);
248
+ } else {
249
+ llvm::SetUnnamedAddress(gv, llvm::UnnamedAddr::Global);
250
+ }
251
252
gv
253
}
254
0 commit comments