[PATCH] D44723: Set dso_local when clearing dllimport
Rafael Avila de Espindola via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 20 19:08:00 PDT 2018
espindola created this revision.
espindola added reviewers: rnk, echristo.
https://reviews.llvm.org/D44723
Files:
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCXX/dllimport.cpp
Index: test/CodeGenCXX/dllimport.cpp
===================================================================
--- test/CodeGenCXX/dllimport.cpp
+++ test/CodeGenCXX/dllimport.cpp
@@ -203,6 +203,8 @@
// Functions
//===----------------------------------------------------------------------===//
+// GNU-DAG: declare dso_local void @_ZdlPv(i8*)
+
// Import function declaration.
// MSC-DAG: declare dllimport void @"?decl@@YAXXZ"()
// GNU-DAG: declare dllimport void @_Z4declv()
Index: lib/CodeGen/CodeGenModule.cpp
===================================================================
--- lib/CodeGen/CodeGenModule.cpp
+++ lib/CodeGen/CodeGenModule.cpp
@@ -2398,8 +2398,10 @@
}
// Handle dropped DLL attributes.
- if (D && !D->hasAttr<DLLImportAttr>() && !D->hasAttr<DLLExportAttr>())
+ if (D && !D->hasAttr<DLLImportAttr>() && !D->hasAttr<DLLExportAttr>()) {
Entry->setDLLStorageClass(llvm::GlobalValue::DefaultStorageClass);
+ setDSOLocal(Entry);
+ }
// If there are two attempts to define the same mangled name, issue an
// error.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44723.139240.patch
Type: text/x-patch
Size: 1076 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180321/3a803023/attachment.bin>
More information about the cfe-commits
mailing list