diff options
-rw-r--r-- | gnu/llvm/lib/CodeGen/TargetLoweringBase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/llvm/lib/CodeGen/TargetLoweringBase.cpp b/gnu/llvm/lib/CodeGen/TargetLoweringBase.cpp index 8ca2bf9e86d..dc01d160e10 100644 --- a/gnu/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/gnu/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1818,7 +1818,10 @@ Value *TargetLoweringBase::getIRStackGuard(IRBuilder<> &IRB) const { if (getTargetMachine().getTargetTriple().isOSOpenBSD()) { Module &M = *IRB.GetInsertBlock()->getParent()->getParent(); PointerType *PtrTy = Type::getInt8PtrTy(M.getContext()); - return M.getOrInsertGlobal("__guard_local", PtrTy); + Constant *C = M.getOrInsertGlobal("__guard_local", PtrTy); + if (GlobalVariable *G = dyn_cast_or_null<GlobalVariable>(C)) + G->setVisibility(GlobalValue::HiddenVisibility); + return C; } return nullptr; } |