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
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;
public:
~DeclContext();
+ Decl::Kind getDeclKind() const {
+ return DeclKind;
+ }
+
/// getParent - Returns the containing DeclContext if this is a ScopedDecl,
/// else returns NULL.
const DeclContext *getParent() const;