Skip to content

Commit

Permalink
Per CCC feedback, just remove this code rather than #if 0 it out.
Browse files Browse the repository at this point in the history
NFC.
  • Loading branch information
gottesmm authored and shahmishal committed May 20, 2021
1 parent bb6dfc6 commit c6f045f
Showing 1 changed file with 0 additions and 26 deletions.
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

0 comments on commit c6f045f

Please sign in to comment.