summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-03-29 16:45:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-03-29 16:45:18 +0000
commitc9643d8fc854555ad5711de84bcbfe91ed7ad256 (patch)
tree5352404ff03c025cc9e4bc885b9f1267f2e6e5ad /clang/lib/CodeGen/CodeGenModule.cpp
parent7e9b87648b4ec63c9d904d3518b0cbb2c674f735 (diff)
downloadbcm5719-llvm-c9643d8fc854555ad5711de84bcbfe91ed7ad256.tar.gz
bcm5719-llvm-c9643d8fc854555ad5711de84bcbfe91ed7ad256.zip
Set dso_local when clearing dllimport.
llvm-svn: 328801
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index bc7ba9011ae..188648cecc9 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2398,8 +2398,10 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction(
}
// 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.
OpenPOWER on IntegriCloud