================
@@ -176,9 +176,11 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const 
CXXDestructorDecl *D) {
   // requires explicit comdat support in the IL.
   if (llvm::GlobalValue::isWeakForLinker(TargetLinkage))
     return true;
-  // Create the alias with no name.
-  auto *Alias = llvm::GlobalAlias::create(AliasValueType, 0, Linkage, "",
-                                          Aliasee, &getModule());
+
+  // Create the alias with no name, in the same address space as the aliasee.
+  auto *Alias = llvm::GlobalAlias::create(
+      AliasValueType, getDataLayout().getProgramAddressSpace(), Linkage, "",
----------------
benshi001 wrote:

fixed.

https://github.com/llvm/llvm-project/pull/236752
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to