OSDN Git Service

De-templatify EmitCallArgs argument type checking, NFCI
authorReid Kleckner <rnk@google.com>
Tue, 8 Dec 2020 21:54:34 +0000 (13:54 -0800)
committerReid Kleckner <rnk@google.com>
Wed, 9 Dec 2020 19:08:00 +0000 (11:08 -0800)
commitd7098ff29c58dd08ede8314818b7de7fd2fea4cc
tree99303452f6abd90737527804fa3642b0ef79354d
parent199ec40e7bcc8548282d803b1a43b1ae1d3b57ce
De-templatify EmitCallArgs argument type checking, NFCI

This template exists to abstract over FunctionPrototype and
ObjCMethodDecl, which have similar APIs for storing parameter types. In
place of a template, use a PointerUnion with two cases to handle this.
Hopefully this improves readability, since the type of the prototype is
easier to discover. This allows me to sink this code, which is mostly
assertions, out of the header file and into the cpp file. I can also
simplify the overloaded methods for computing isGenericMethod, and get
rid of the second EmitCallArgs overload.

Differential Revision: https://reviews.llvm.org/D92883
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGExprCXX.cpp
clang/lib/CodeGen/CodeGenFunction.h