DeclContext::KindTrait was not meant to be used outside of DeclContext::CastTo (causes compilation error on MSVC).
Add DeclContext::getDeclKind() and use that instead of DeclContext::KindTrait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62164 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index d16b494..9487a05 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -575,8 +575,7 @@
 void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, 
                                           unsigned Indentation) {
   // Print DeclContext name.
-  Decl::Kind DK = DeclContext::KindTrait<DeclContext>::getKind(DC);
-  switch (DK) {
+  switch (DC->getDeclKind()) {
   case Decl::TranslationUnit:
     Out << "[translation unit] " << DC;
     break;