summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 8d7040bad4d..f4a0b679e55 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -846,9 +846,8 @@ void Verifier::visitMDSubprogram(const MDSubprogram &N) {
auto *FMD = dyn_cast<ConstantAsMetadata>(RawF);
auto *F = FMD ? FMD->getValue() : nullptr;
auto *FT = F ? dyn_cast<PointerType>(F->getType()) : nullptr;
- Assert(F && (isa<Function>(F) || isa<ConstantPointerNull>(F)) && FT &&
- isa<FunctionType>(FT->getElementType()),
- "invalid function", &N, F);
+ Assert(F && FT && isa<FunctionType>(FT->getElementType()),
+ "invalid function", &N, F, FT);
}
if (N.getRawTemplateParams()) {
auto *Params = dyn_cast<MDTuple>(N.getRawTemplateParams());
OpenPOWER on IntegriCloud