SILOptimizer: rename cdecl to ctor (NFC)

`cdecl` is a keyword in the non-conforming C++ dialect used on Windows
which expands to `__cdecl`.  Simply rename the variable to avoid the
replacement.  Although it is possible to `#undef cdecl`, renaming makes
it less confusing for non-Windows developers.
This commit is contained in:
Saleem Abdulrasool
2019-10-03 08:37:48 -07:00
parent ce531be1bc
commit 085439781b

View File

@@ -792,10 +792,10 @@ bool isAutoGeneratedInitOfOSLogMessage(SILFunction &fun) {
Decl *decl = declContext->getAsDecl();
if (!decl)
return false;
ConstructorDecl *cdecl = dyn_cast<ConstructorDecl>(decl);
if (!cdecl)
ConstructorDecl *ctor = dyn_cast<ConstructorDecl>(decl);
if (!ctor)
return false;
DeclContext *parentContext = cdecl->getParent();
DeclContext *parentContext = ctor->getParent();
if (!parentContext)
return false;
NominalTypeDecl *typeDecl = parentContext->getSelfNominalTypeDecl();