From a3dbc680a7134dc64fdf8033699c17e2e4113472 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 30 Mar 2015 17:04:06 +0000 Subject: [PATCH] Verifier: Loosen r233559 check for 'function:' field in MDSubprogram Stop worrying about what the `function:` field is in `MDSubprogram`, since it could be a bitcast [1]. Just check its type and leave it at that. [1]: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/3540/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233562 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Verifier.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 8d7040bad4d..f4a0b679e55 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -846,9 +846,8 @@ void Verifier::visitMDSubprogram(const MDSubprogram &N) { auto *FMD = dyn_cast(RawF); auto *F = FMD ? FMD->getValue() : nullptr; auto *FT = F ? dyn_cast(F->getType()) : nullptr; - Assert(F && (isa(F) || isa(F)) && FT && - isa(FT->getElementType()), - "invalid function", &N, F); + Assert(F && FT && isa(FT->getElementType()), + "invalid function", &N, F, FT); } if (N.getRawTemplateParams()) { auto *Params = dyn_cast(N.getRawTemplateParams());