diff options
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
| -rw-r--r-- | clang/lib/CodeGen/MicrosoftCXXABI.cpp | 10 |
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) { |

