[llvm] r233665 - Verifier: Don't return early from verifyTypeRefs()
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Mar 30 19:37:13 PDT 2015
Author: dexonsmith
Date: Mon Mar 30 21:37:13 2015
New Revision: 233665
URL: http://llvm.org/viewvc/llvm-project?rev=233665&view=rev
Log:
Verifier: Don't return early from verifyTypeRefs()
We'll no longer crash in the `verifyTypeRefs()` (used to be called
`verifyDebugInfo()`), so there's no reason to return early here. Remove
the `EverBroken` member since this was the only use!
Modified:
llvm/trunk/lib/IR/Verifier.cpp
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=233665&r1=233664&r2=233665&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Mon Mar 30 21:37:13 2015
@@ -87,10 +87,9 @@ struct VerifierSupport {
/// \brief Track the brokenness of the module while recursively visiting.
bool Broken;
- bool EverBroken;
explicit VerifierSupport(raw_ostream &OS)
- : OS(OS), M(nullptr), Broken(false), EverBroken(false) {}
+ : OS(OS), M(nullptr), Broken(false) {}
private:
void Write(const Value *V) {
@@ -145,7 +144,7 @@ public:
/// something is not correct.
void CheckFailed(const Twine &Message) {
OS << Message << '\n';
- EverBroken = Broken = true;
+ Broken = true;
}
/// \brief A check failed (with values to print).
@@ -3387,11 +3386,6 @@ void Verifier::visitUnresolvedTypeRef(co
}
void Verifier::verifyTypeRefs() {
- // Run the debug info verifier only if the regular verifier succeeds, since
- // sometimes checks that have already failed will cause crashes here.
- if (EverBroken || !VerifyDebugInfo)
- return;
-
auto *CUs = M->getNamedMetadata("llvm.dbg.cu");
if (!CUs)
return;
More information about the llvm-commits
mailing list