diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-30 17:04:06 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-30 17:04:06 +0000 |
commit | 894b1e385c74aa7f05abbba779022da68a2db372 (patch) | |
tree | 2f03992e035a87814f2497d404935dbbc70e1930 /llvm/lib/IR/Verifier.cpp | |
parent | 0e202b95c4fcdf87f330cb4c1df0916be94f0556 (diff) | |
download | bcm5719-llvm-894b1e385c74aa7f05abbba779022da68a2db372.tar.gz bcm5719-llvm-894b1e385c74aa7f05abbba779022da68a2db372.zip |
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/
llvm-svn: 233562
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 5 |
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()); |