Skip to content

Release/5.4 CCC feedback rdar://77325585 #37518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions lib/SIL/Verifier/SILVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,32 +1213,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
DebugVars[ArgNo] = VarInfo->Name;
}
}

// Disable these checks just on 5.4 when compiler asserts are enabled.
//
// These just verify some things about debug info that shouldn't stop a program
// from not-compiling. When optimizing in certain cases, we found that we were
// hitting these on linux platforms since on linux platforms, we ship the
// compiler with assertions enabled. So by disabling this we can at least at
// the expense of slightly worse debug info when compiling with optimization
// eliminate these crashes. Darwin does not ship with compiler-asserts so is
// unaffected.
#if 0
// Regular locations are allowed on all instructions.
if (LocKind == SILLocation::RegularKind)
return;

if (LocKind == SILLocation::ReturnKind ||
LocKind == SILLocation::ImplicitReturnKind)
require(InstKind == SILInstructionKind::BranchInst ||
InstKind == SILInstructionKind::ReturnInst ||
InstKind == SILInstructionKind::UnreachableInst,
"return locations are only allowed on branch and return instructions");

if (LocKind == SILLocation::ArtificialUnreachableKind)
require(InstKind == SILInstructionKind::UnreachableInst,
"artificial locations are only allowed on Unreachable instructions");
#endif
}

/// Check that the types of this value producer are all legal in the function
Expand Down