From 544174947817538d15a105fe2de4f2094079fd6c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 25 Aug 2009 18:53:40 -0700 Subject: Compute cu_name dynamically We only need cu_name for errors and verbose messages, so it's a waste to always construct it in focus_on_cu. It's now built only as-needed. * dwflpp.cxx (dwflpp::cu_name): Now a method instead of a data member. (dwflpp::focus_on_module): No cu_name to clear now. (dwflpp::focus_on_cu): No cu_name to set now. (dwflpp::declaration_resolve): Adjust to call cu_name() now. (dwflpp::iterate_over_functions): Ditto. * tapsets.cxx (query_cu): Ditto. --- tapsets.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 04fbf6e0..10f3d0a7 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1395,7 +1395,7 @@ query_cu (Dwarf_Die * cudie, void * arg) q->dw.focus_on_cu (cudie); if (false && q->sess.verbose>2) - clog << "focused on CU '" << q->dw.cu_name + clog << "focused on CU '" << q->dw.cu_name() << "', in module '" << q->dw.module_name << "'\n"; if (q->has_statement_str || q->has_statement_num @@ -1443,7 +1443,7 @@ query_cu (Dwarf_Die * cudie, void * arg) if (address_line) msg << " (try 0x" << hex << lineaddr << ")"; else - msg << " (no line info found for '" << q->dw.cu_name + msg << " (no line info found for '" << q->dw.cu_name() << "', in module '" << q->dw.module_name << "')"; if (! q->sess.guru_mode) throw semantic_error(msg.str()); -- cgit