summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-17 01:20:03 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-17 01:20:03 +0000
commit95d401de9dabfe99c54dd484a780f4cddab2c26a (patch)
treee7ae215df7ba421e7d9e7198ad3e06b02f4f1810 /clang/lib
parentc6756ab0ae493309f85b32ca11a67abe5c76d3e5 (diff)
downloadbcm5719-llvm-95d401de9dabfe99c54dd484a780f4cddab2c26a.tar.gz
bcm5719-llvm-95d401de9dabfe99c54dd484a780f4cddab2c26a.zip
If we are not doing a Debug build, no need for the debugging print methods.
llvm-svn: 76138
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Index/ResolveLocation.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Index/ResolveLocation.cpp b/clang/lib/Index/ResolveLocation.cpp
index edb46c23f4f..4bff08e2ea7 100644
--- a/clang/lib/Index/ResolveLocation.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud