Skip to content

Commit 1b01311

Browse files
committed
[CIR][CodeGen][NFC] Implement a missing function
This was declared but never implemented. Upon first usage in a later commit this fails to link. Reviewers: bcardosolopes, smeenai Reviewed By: smeenai Pull Request: #1024
1 parent 851bca6 commit 1b01311

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenCleanup.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -707,4 +707,15 @@ void EHScopeStack::pushTerminate() {
707707
char *Buffer = allocate(EHTerminateScope::getSize());
708708
new (Buffer) EHTerminateScope(InnermostEHScope);
709709
InnermostEHScope = stable_begin();
710-
}
710+
}
711+
712+
bool EHScopeStack::containsOnlyLifetimeMarkers(
713+
EHScopeStack::stable_iterator old) const {
714+
for (EHScopeStack::iterator it = begin(); stabilize(it) != old; it++) {
715+
EHCleanupScope *cleanup = dyn_cast<EHCleanupScope>(&*it);
716+
if (!cleanup || !cleanup->isLifetimeMarker())
717+
return false;
718+
}
719+
720+
return true;
721+
}

0 commit comments

Comments
 (0)