[NFC][CLANG] Fix bug with dereference null return value in GetFunctionTypeForVTable()
authorManna, Soumi <soumi.manna@intel.com>
Fri, 2 Jun 2023 20:23:51 +0000 (13:23 -0700)
committerManna, Soumi <soumi.manna@intel.com>
Fri, 2 Jun 2023 20:28:06 +0000 (13:28 -0700)
commit02ce49afb9a078932c74f4d9b43189a5567e54e9
tree136554022949f652f37839c58dc0b132155a58fa
parent1f3008733231517d7aed2493403e7fa130028538
[NFC][CLANG] Fix bug with dereference null return value in GetFunctionTypeForVTable()

This patch uses castAs instead of getAs which will assert if the type doesn't match in clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable(clang::GlobalDecl).

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D151957
clang/lib/CodeGen/CGCall.cpp