forked from OSchip/llvm-project
[SSP] Restore setting the visibility of __guard_local to hidden for better code generation.
Patch by: Philip Guenther
This commit is contained in:
parent
ba1de5f2f7
commit
d870e36326
|
@ -1844,7 +1844,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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue