]> git.cworth.org Git - apitrace/blobdiff - retrace.py
Merge branch 'master' into multi-context
[apitrace] / retrace.py
index 9e42be38b874edd0f25404f7773e6cad2975a311..81652e5eddb1afd0bf9ec9ffab8be71fe4552c35 100644 (file)
@@ -186,6 +186,9 @@ class Retracer:
         print
 
     def retrace_function_body(self, function):
+        if not function.sideeffects:
+            return
+
         success = True
         for arg in function.args:
             arg_type = ConstRemover().visit(arg.type)
@@ -241,8 +244,7 @@ class Retracer:
         functions = filter(self.filter_function, functions)
 
         for function in functions:
-            if function.sideeffects:
-                self.retrace_function(function)
+            self.retrace_function(function)
 
         print 'void retrace::retrace_call(Trace::Call &call) {'
         print '    const char *name = call.name().c_str();'
@@ -252,8 +254,7 @@ class Retracer:
 
         def handle_case(function_name):
             function = func_dict[function_name]
-            if function.sideeffects:
-                print '        retrace_%s(call);' % function.name
+            print '        retrace_%s(call);' % function.name
             print '        return;'
     
         string_switch('name', func_dict.keys(), handle_case)