diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index c09adad09aa8f4..d75b5a1a9d1256 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1725,7 +1725,7 @@ void CGDebugInfo::CollectRecordFields( llvm::DISubroutineType * CGDebugInfo::getOrCreateMethodType(const CXXMethodDecl *Method, llvm::DIFile *Unit, bool decl) { - const FunctionProtoType *Func = Method->getType()->getAs(); + const auto *Func = Method->getType()->castAs(); if (Method->isStatic()) return cast_or_null( getOrCreateType(QualType(Func, 0), Unit));