mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 19:25:00 +00:00
Add getFirstInsertionPt() method.
getFirstInsertionPt() returns an iterator to the first insertion point in a basic block. This is after all PHIs and any other instruction which is required to be at the top of the basic block (like LandingPadInst). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137744 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -167,6 +167,12 @@ Instruction* BasicBlock::getFirstNonPHIOrDbgOrLifetime() {
|
||||
return &*i;
|
||||
}
|
||||
|
||||
BasicBlock::iterator BasicBlock::getFirstInsertionPt() {
|
||||
iterator InsertPt = getFirstNonPHI();
|
||||
if (isa<LandingPadInst>(InsertPt)) ++InsertPt;
|
||||
return InsertPt;
|
||||
}
|
||||
|
||||
void BasicBlock::dropAllReferences() {
|
||||
for(iterator I = begin(), E = end(); I != E; ++I)
|
||||
I->dropAllReferences();
|
||||
|
Reference in New Issue
Block a user