================
@@ -4849,9 +4852,12 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef 
MangledName, llvm::Type *Ty,
         Entry->setLinkage(llvm::Function::ExternalLinkage);
     }
 
-    // Handle dropped DLL attributes.
-    if (D && !D->hasAttr<DLLImportAttr>() && !D->hasAttr<DLLExportAttr>() &&
-        !shouldMapVisibilityToDLLExport(D))
+    // Handle dropped dllimport.
+    if (D &&
+        (Entry->getDLLStorageClass() ==
+         llvm::GlobalVariable::DLLImportStorageClass) &&
+        !D->hasAttr<DLLImportAttr>() &&
+        !shouldMapVisibilityToDLLExport(cast_or_null<NamedDecl>(D)))
----------------
nga888 wrote:

This part of the code isn't directly related to the change but I assume I can 
go ahead and change it?

https://github.com/llvm/llvm-project/pull/93302
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to