diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-17 01:20:03 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-17 01:20:03 +0000 |
commit | ada45428b6855bbffb9abd65fa77039a5259f6c2 (patch) | |
tree | 18e8cc21ed958d2bd5bf0b4a2c2526603ec51104 /lib/Index/ResolveLocation.cpp | |
parent | bfb498d0996ef049efe9476f2802976fd145cd60 (diff) |
If we are not doing a Debug build, no need for the debugging print methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/ResolveLocation.cpp')
-rw-r--r-- | lib/Index/ResolveLocation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Index/ResolveLocation.cpp b/lib/Index/ResolveLocation.cpp index edb46c23f4..4bff08e2ea 100644 --- a/lib/Index/ResolveLocation.cpp +++ b/lib/Index/ResolveLocation.cpp @@ -59,10 +59,12 @@ public: LocResolverBase(ASTContext &ctx, SourceLocation loc) : Ctx(ctx), Loc(loc) {} +#ifndef NDEBUG /// \brief Debugging output. void print(Decl *D); /// \brief Debugging output. void print(Stmt *Node); +#endif }; /// \brief Searches a statement for the ASTLocation that corresponds to a source @@ -255,9 +257,10 @@ LocResolverBase::RangePos LocResolverBase::CheckRange(SourceRange Range) { return ContainsLoc; } +#ifndef NDEBUG void LocResolverBase::print(Decl *D) { llvm::raw_ostream &OS = llvm::outs(); - OS << "#### DECL ####\n"; + OS << "#### DECL " << D->getDeclKindName() << " ####\n"; D->print(OS); OS << " <"; D->getLocStart().print(OS, Ctx.getSourceManager()); @@ -269,7 +272,7 @@ void LocResolverBase::print(Decl *D) { void LocResolverBase::print(Stmt *Node) { llvm::raw_ostream &OS = llvm::outs(); - OS << "#### STMT ####\n"; + OS << "#### STMT " << Node->getStmtClassName() << " ####\n"; Node->printPretty(OS, Ctx, 0, PrintingPolicy(Ctx.getLangOptions())); OS << " <"; Node->getLocStart().print(OS, Ctx.getSourceManager()); @@ -278,6 +281,7 @@ void LocResolverBase::print(Stmt *Node) { OS << ">\n\n"; OS.flush(); } +#endif /// \brief Returns the AST node that a source location points to. |