swift-api-digester: separate internal and external names for node kinds. NFC

This commit is contained in:
Xi Ge
2018-04-05 15:38:09 -07:00
parent 1163c33cfc
commit 72f49e2351
4 changed files with 19 additions and 18 deletions

View File

@@ -962,7 +962,7 @@ public:
static bool classof(const SDKNode *N);
};
#define NODE_KIND(X) \
#define NODE_KIND(X, NAME) \
bool SDKNode##X::classof(const SDKNode *N) { \
return N->getKind() == SDKNodeKind::X; \
}
@@ -1387,7 +1387,7 @@ SDKNodeInitInfo::SDKNodeInitInfo(SDKContext &Ctx, ValueDecl *VD)
SDKNode *SDKNodeInitInfo::createSDKNode(SDKNodeKind Kind) {
switch(Kind) {
#define NODE_KIND(X) \
#define NODE_KIND(X, NAME) \
case SDKNodeKind::X: \
return static_cast<SDKNode*>(new (Ctx.allocator().Allocate<SDKNode##X>()) \
SDKNode##X(*this)); \