Skip to content

Commit c547f57

Browse files
authored
Merge pull request swiftlang#62737 from valeriyvan/PrunedLiveness-null-derefence
Fix NULL pointer dereference
2 parents 0c64fe4 + ad33e6a commit c547f57

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SIL/Utils/PrunedLiveness.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ llvm::StringRef PrunedLiveBlocks::getStringRef(IsLive isLive) const {
174174
void PrunedLiveBlocks::print(llvm::raw_ostream &OS) const {
175175
if (!discoveredBlocks) {
176176
OS << "No deterministic live block list\n";
177+
return;
177178
}
178179
SmallVector<IsLive, 8> isLive;
179180
for (auto *block : *discoveredBlocks) {

0 commit comments

Comments
 (0)