[sil] Use SILNodes.def to define ARGKIND##ArrayRef instead of hard coding names.

I also changed all of the places that vended these to use SILNodes.def as well
so that when new argument kinds are added, things just work.
This commit is contained in:
Michael Gottesman
2019-11-29 08:51:27 -08:00
parent 8ac1f349a1
commit df47eb2c1f
17 changed files with 35 additions and 50 deletions

View File

@@ -26,15 +26,12 @@
namespace swift {
class SILArgument;
class SILPhiArgument;
class SILFunctionArgument;
using PhiArgumentArrayRef =
TransformRange<ArrayRef<SILArgument *>, SILPhiArgument *(*)(SILArgument *)>;
using FunctionArgumentArrayRef =
TransformRange<ArrayRef<SILArgument *>,
SILFunctionArgument *(*)(SILArgument *)>;
#define ARGUMENT(NAME, PARENT) \
class NAME; \
using NAME##ArrayRef = \
TransformRange<ArrayRef<SILArgument *>, NAME *(*)(SILArgument *)>;
#include "swift/SIL/SILNodes.def"
} // namespace swift