From 982bf827b57a727ceeec9bd34c25ccb2b0133a9d Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 18 Feb 2017 03:02:44 +0000 Subject: [IR/Verifier] Don't visit DISubprograms more than needed. Before this patch we happened to visit twice, one when scanning MDNodes and the other one while visiting the function. Remove the explicit call to visitDISubprogram there, so we don't emit the same error twice in case the verifier fail and we save some time when running it. Thanks to Justin Bogner for the report and Adrian for the quick review! PR: 31995 llvm-svn: 295537 --- llvm/lib/IR/Verifier.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'llvm/lib/IR/Verifier.cpp') diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 9c2da10c9e1..c14e2bbdee4 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2119,8 +2119,6 @@ void Verifier::visitFunction(const Function &F) { if (!N) return; - visitDISubprogram(*N); - // Check that all !dbg attachments lead to back to N (or, at least, another // subprogram that describes the same function). // -- cgit v1.2.3