aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/glcpp/.gitignore3
-rw-r--r--mesalib/src/glsl/ir.h10
-rw-r--r--mesalib/src/glsl/ir_constant_expression.cpp7
3 files changed, 15 insertions, 5 deletions
diff --git a/mesalib/src/glsl/glcpp/.gitignore b/mesalib/src/glsl/glcpp/.gitignore
index 41b34bb30..24a7119ca 100644
--- a/mesalib/src/glsl/glcpp/.gitignore
+++ b/mesalib/src/glsl/glcpp/.gitignore
@@ -3,7 +3,4 @@ glcpp-lex.c
glcpp-parse.output
glcpp-parse.c
glcpp-parse.h
-*.o
-*.lo
-*~
tests/*.out
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index 2c4723627..a3f9f0588 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -89,6 +89,16 @@ class ir_instruction : public exec_node {
public:
enum ir_node_type ir_type;
+ /**
+ * GCC 4.7+ and clang warn when deleting an ir_instruction unless
+ * there's a virtual destructor present. Because we almost
+ * universally use ralloc for our memory management of
+ * ir_instructions, the destructor doesn't need to do any work.
+ */
+ virtual ~ir_instruction()
+ {
+ }
+
/** ir_print_visitor helper for debugging. */
void print(void) const;
diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp
index 7a4d15f43..38a1ed96c 100644
--- a/mesalib/src/glsl/ir_constant_expression.cpp
+++ b/mesalib/src/glsl/ir_constant_expression.cpp
@@ -1322,8 +1322,11 @@ ir_function_signature::constant_expression_value(exec_list *actual_parameters, s
foreach_list(n, actual_parameters) {
ir_constant *constant = ((ir_rvalue *) n)->constant_expression_value(variable_context);
- if (constant == NULL)
- return NULL;
+ if (constant == NULL) {
+ hash_table_dtor(deref_hash);
+ return NULL;
+ }
+
ir_variable *var = (ir_variable *)parameter_info;
hash_table_insert(deref_hash, constant, var);