]> sourceware.org Git - systemtap.git/commitdiff
Make private functions play well with default optimizations.
authorMartin Cermak <mcermak@redhat.com>
Tue, 3 Nov 2015 15:16:36 +0000 (10:16 -0500)
committerMartin Cermak <mcermak@redhat.com>
Tue, 3 Nov 2015 15:27:27 +0000 (10:27 -0500)
Without this update, duplicate_function_remover::visit_functioncall()
would treat two different private functions of the same name as one
("Changing B reference to A reference"). This would happen with default
optimizations (without -u). This fix is analogical to b834d412e356
(mcermak/private branch) which does similar thing for private globals.

elaborate.cxx

index 2079936b002561da66fabaa1c17bee06864984b5..e372e731e70fe9c97913af132ead5b7b2c0f6180 100644 (file)
@@ -2299,7 +2299,10 @@ symresolution_info::visit_functioncall (functioncall* e)
 
   functiondecl* d = find_function (e->function, e->args.size (), e->tok);
   if (d)
+  {
     e->referent = d;
+    e->function = d->name;
+  }
   else
     {
       string sugs = levenshtein_suggest(e->function, collect_functions(), 5); // print 5 funcs
This page took 0.0344 seconds and 5 git commands to generate.