Properly cast from DeclContext to Decl.
Apparently there's a special procedure for doing this. Not
following this silently breaks builds.
llvm-svn: 346156
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index ab378cd..12a83da 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -1285,7 +1285,7 @@
return CompilerType(ast, ast->getPointerType(char_type));
}
-clang::TranslationUnitDecl *
+clang::DeclContext *
ClangASTContext::GetTranslationUnitDecl(clang::ASTContext *ast) {
return ast->getTranslationUnitDecl();
}
@@ -8966,7 +8966,7 @@
#define DEPTH_INCREMENT 2
void ClangASTContext::Dump(Stream &s) {
- TranslationUnitDecl *tu = GetTranslationUnitDecl();
+ Decl *tu = Decl::castFromDeclContext(GetTranslationUnitDecl());
tu->dump(s.AsRawOstream());
}