summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-03-22 23:02:19 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-03-22 23:02:19 +0000
commit1c40647e1c33ae86ac2f80068d0ba9554878f04f (patch)
tree6ec9c0f00abcc6f05ff2218ff172c9752cc6f6f0 /clang/lib
parent5bdf02f4fc905b97f653dfab4aac0778a8aba1d8 (diff)
downloadbcm5719-llvm-1c40647e1c33ae86ac2f80068d0ba9554878f04f.tar.gz
bcm5719-llvm-1c40647e1c33ae86ac2f80068d0ba9554878f04f.zip
Set dso_local on __ImageBase.
llvm-svn: 328266
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index d7fac79c86e..6ee423bb82e 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -523,10 +523,12 @@ public:
if (llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(Name))
return GV;
- return new llvm::GlobalVariable(CGM.getModule(), CGM.Int8Ty,
- /*isConstant=*/true,
- llvm::GlobalValue::ExternalLinkage,
- /*Initializer=*/nullptr, Name);
+ auto *GV = new llvm::GlobalVariable(CGM.getModule(), CGM.Int8Ty,
+ /*isConstant=*/true,
+ llvm::GlobalValue::ExternalLinkage,
+ /*Initializer=*/nullptr, Name);
+ CGM.setDSOLocal(GV);
+ return GV;
}
llvm::Constant *getImageRelativeConstant(llvm::Constant *PtrVal) {
OpenPOWER on IntegriCloud