summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ASTResultSynthesizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/ASTResultSynthesizer.cpp')
-rw-r--r--lldb/source/Expression/ASTResultSynthesizer.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp
index f295209f6bd..e33fd76168d 100644
--- a/lldb/source/Expression/ASTResultSynthesizer.cpp
+++ b/lldb/source/Expression/ASTResultSynthesizer.cpp
@@ -131,8 +131,6 @@ ASTResultSynthesizer::SynthesizeFunctionResult (FunctionDecl *FunDecl)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
- ASTContext &Ctx(*m_ast_context);
-
if (!m_sema)
return false;
@@ -146,11 +144,11 @@ ASTResultSynthesizer::SynthesizeFunctionResult (FunctionDecl *FunDecl)
std::string s;
raw_string_ostream os(s);
- Ctx.getTranslationUnitDecl()->print(os);
+ function_decl->print(os);
os.flush();
- log->Printf("AST context before transforming:\n%s", s.c_str());
+ log->Printf ("Untransformed function AST:\n%s", s.c_str());
}
Stmt *function_body = function_decl->getBody();
@@ -178,9 +176,7 @@ bool
ASTResultSynthesizer::SynthesizeObjCMethodResult (ObjCMethodDecl *MethodDecl)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
-
- ASTContext &Ctx(*m_ast_context);
-
+
if (!m_sema)
return false;
@@ -192,11 +188,11 @@ ASTResultSynthesizer::SynthesizeObjCMethodResult (ObjCMethodDecl *MethodDecl)
std::string s;
raw_string_ostream os(s);
- Ctx.getTranslationUnitDecl()->print(os);
+ MethodDecl->print(os);
os.flush();
- log->Printf("AST context before transforming:\n%s", s.c_str());
+ log->Printf ("Untransformed method AST:\n%s", s.c_str());
}
Stmt *method_body = MethodDecl->getBody();
@@ -209,7 +205,7 @@ ASTResultSynthesizer::SynthesizeObjCMethodResult (ObjCMethodDecl *MethodDecl)
bool ret = SynthesizeBodyResult (compound_stmt,
MethodDecl);
- if (log)
+ if (log && log->GetVerbose())
{
std::string s;
raw_string_ostream os(s);
@@ -218,7 +214,7 @@ ASTResultSynthesizer::SynthesizeObjCMethodResult (ObjCMethodDecl *MethodDecl)
os.flush();
- log->Printf("Transformed function AST:\n%s", s.c_str());
+ log->Printf("Transformed method AST:\n%s", s.c_str());
}
return ret;
OpenPOWER on IntegriCloud