[IR] Use isEntryBlock() API (NFC)
This commit is contained in:
parent
a6a526ec54
commit
a545c7f4a1
@ -1519,7 +1519,7 @@ bool AllocaInst::isStaticAlloca() const {
|
||||
|
||||
// Must be in the entry block.
|
||||
const BasicBlock *Parent = getParent();
|
||||
return Parent == &Parent->getParent()->front() && !isUsedWithInAlloca();
|
||||
return Parent->isEntryBlock() && !isUsedWithInAlloca();
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@ -5250,8 +5250,8 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
|
||||
break;
|
||||
case Intrinsic::localescape: {
|
||||
BasicBlock *BB = Call.getParent();
|
||||
Check(BB == &BB->getParent()->front(),
|
||||
"llvm.localescape used outside of entry block", Call);
|
||||
Check(BB->isEntryBlock(), "llvm.localescape used outside of entry block",
|
||||
Call);
|
||||
Check(!SawFrameEscape, "multiple calls to llvm.localescape in one function",
|
||||
Call);
|
||||
for (Value *Arg : Call.args()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user