summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-02-26 16:25:45 -0800
committerJosh Stone <jistone@redhat.com>2010-02-26 16:25:45 -0800
commit59de45f155d78e08f55e5ee5e16c24af40f20e5a (patch)
tree4fe2f2a12291a7140949701695a45b8a0588e662 /elaborate.cxx
parent7f9ad862adbbc75b5e7501173db702ef09ac18ce (diff)
downloadsystemtap-steved-59de45f155d78e08f55e5ee5e16c24af40f20e5a.tar.gz
systemtap-steved-59de45f155d78e08f55e5ee5e16c24af40f20e5a.tar.xz
systemtap-steved-59de45f155d78e08f55e5ee5e16c24af40f20e5a.zip
Squash elision warnings on synthetic functions
* staptree.h (functiondecl): Add a synthetic flag. * elaborate.cxx (semantic_pass_opt1): Don't warn about synthetic funcs. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Mark the new function as synthetic. (dwarf_cast_expanding_visitor::visit_cast_op): Ditto. (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto. * tapset-perfmon.cxx (perfmon_var_expanding_visitor::visit_target_symbol): Ditto. * tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol): Ditto. * testsuite/semok/thirtyeight.stp: New check with -W and @defined.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index 12dbce3a..f442aceb 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -2013,7 +2013,7 @@ void semantic_pass_opt1 (systemtap_session& s, bool& relaxed_p)
if (ftv.traversed.find(fd) == ftv.traversed.end())
{
if (fd->tok->location.file->name == s.user_file->name && // !tapset
- ! s.suppress_warnings)
+ ! s.suppress_warnings && ! fd->synthetic)
s.print_warning ("eliding unused function '" + fd->name + "'", fd->tok);
else if (s.verbose>2)
clog << "Eliding unused function " << fd->name