mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Target triple OS detection tidyup. NFC
Use Triple::isOS*() helpers where possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222960 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -346,7 +346,7 @@ static bool CreatePrologue(Function *F, Module *M, ReturnInst *RI,
|
||||
|
||||
StackGuardVar = ConstantExpr::getIntToPtr(
|
||||
OffsetVal, PointerType::get(PtrTy, AddressSpace));
|
||||
} else if (Trip.getOS() == llvm::Triple::OpenBSD) {
|
||||
} else if (Trip.isOSOpenBSD()) {
|
||||
StackGuardVar = M->getOrInsertGlobal("__guard_local", PtrTy);
|
||||
cast<GlobalValue>(StackGuardVar)
|
||||
->setVisibility(GlobalValue::HiddenVisibility);
|
||||
@ -477,7 +477,7 @@ BasicBlock *StackProtector::CreateFailBB() {
|
||||
LLVMContext &Context = F->getContext();
|
||||
BasicBlock *FailBB = BasicBlock::Create(Context, "CallStackCheckFailBlk", F);
|
||||
IRBuilder<> B(FailBB);
|
||||
if (Trip.getOS() == llvm::Triple::OpenBSD) {
|
||||
if (Trip.isOSOpenBSD()) {
|
||||
Constant *StackChkFail = M->getOrInsertFunction(
|
||||
"__stack_smash_handler", Type::getVoidTy(Context),
|
||||
Type::getInt8PtrTy(Context), nullptr);
|
||||
|
Reference in New Issue
Block a user