mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[SSP] Restore setting the visibility of __guard_local to hidden for better code generation.
Patch by: Philip Guenther (cherry picked from commit d870e363263835bec96c83f51b20e64722cad742)
This commit is contained in:
parent
43b4ea8954
commit
d812075793
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user