From 797070859ead5d9ac291080daeed1348f285fb87 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 31 Mar 2015 02:37:13 +0000 Subject: [PATCH] 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! llvm-svn: 233665 --- lib/IR/Verifier.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 4adc56c6139..15fbea33d89 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -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(const MDString *S, const MDNode *N) { } 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;