diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-09-16 16:58:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-09-16 16:58:29 +0000 |
commit | 16d6b3b3da62aa5baaf3c66c8d4e6f8c8f70aeb7 (patch) | |
tree | 6031356a30dab2c3c69c332095eb59f34b4e0961 /contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | ceff9b9d2587c46759fd6fb312916d5748986918 (diff) | |
parent | e588341d487d7ec86b5282968e3223f8c0e6de27 (diff) |
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp index 2c94c2c62e5f..42c1fa8af0e6 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1827,7 +1827,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; } |