diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp b/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp index 882d400..4a63d76 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp @@ -12,19 +12,19 @@ //===----------------------------------------------------------------------===// #include "clang/Frontend/ASTConsumers.h" -#include "clang/Basic/FileManager.h" -#include "clang/Basic/Diagnostic.h" -#include "clang/Basic/SourceManager.h" #include "clang/AST/AST.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/PrettyPrinter.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/RecursiveASTVisitor.h" -#include "llvm/Module.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/FileManager.h" +#include "clang/Basic/SourceManager.h" +#include "llvm/IR/Module.h" #include "llvm/Support/Path.h" -#include "llvm/Support/raw_ostream.h" #include "llvm/Support/Timer.h" +#include "llvm/Support/raw_ostream.h" using namespace clang; //===----------------------------------------------------------------------===// @@ -59,9 +59,12 @@ namespace { bool TraverseDecl(Decl *D) { if (D != NULL && filterMatches(D)) { - Out.changeColor(llvm::raw_ostream::BLUE) << - (Dump ? "Dumping " : "Printing ") << getName(D) << ":\n"; - Out.resetColor(); + bool ShowColors = Out.has_colors(); + if (ShowColors) + Out.changeColor(raw_ostream::BLUE); + Out << (Dump ? "Dumping " : "Printing ") << getName(D) << ":\n"; + if (ShowColors) + Out.resetColor(); if (Dump) D->dump(Out); else @@ -101,7 +104,8 @@ namespace { bool shouldWalkTypesOfTypeLocs() const { return false; } virtual bool VisitNamedDecl(NamedDecl *D) { - Out << D->getQualifiedNameAsString() << "\n"; + D->printQualifiedName(Out); + Out << '\n'; return true; } @@ -459,6 +463,10 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, Out << "<class template> " << *CTD << '\n'; break; } + case Decl::OMPThreadPrivate: { + Out << "<omp threadprivate> " << '"' << *I << "\"\n"; + break; + } default: Out << "DeclKind: " << DK << '"' << *I << "\"\n"; llvm_unreachable("decl unhandled"); |