summaryrefslogtreecommitdiffstats
path: root/src/glsl/loop_analysis.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-10 16:26:33 -0700
committerIan Romanick <[email protected]>2013-02-07 21:18:42 -0800
commit82691f12931a022560f8054c8c8e240cd6b2fff4 (patch)
treeee69e3bcfe13b9625bd01926d781b328bad84f8b /src/glsl/loop_analysis.h
parent04f0d6cc2235ba50f7525446004f634e03632eeb (diff)
glsl: Change loop_analysis to not look like a resource leak
Previously the loop_state was allocated in the loop_analysis constructor, but not freed in the (nonexistent) destructor. Moving the allocation of the loop_state makes this code appear less sketchy. Either way, there is no actual leak. The loop_state is freed by the single caller of analyze_loop_variables. Signed-off-by: Ian Romanick <[email protected]> Cc: Dave Airlie <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57753
Diffstat (limited to 'src/glsl/loop_analysis.h')
-rw-r--r--src/glsl/loop_analysis.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/loop_analysis.h b/src/glsl/loop_analysis.h
index 05c982fc164..769d626614b 100644
--- a/src/glsl/loop_analysis.h
+++ b/src/glsl/loop_analysis.h
@@ -249,7 +249,7 @@ private:
void *mem_ctx;
- friend class loop_analysis;
+ friend loop_state *analyze_loop_variables(exec_list *instructions);
};
#endif /* LOOP_ANALYSIS_H */