summaryrefslogtreecommitdiffstats
path: root/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ir.cpp')
-rw-r--r--ir.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/ir.cpp b/ir.cpp
index 8912c00e827..e7e5dee00cb 100644
--- a/ir.cpp
+++ b/ir.cpp
@@ -364,6 +364,24 @@ ir_function_signature::qualifiers_match(exec_list *params)
}
+void
+ir_function_signature::replace_parameters(exec_list *new_params)
+{
+ /* Destroy all of the previous parameter information. If the previous
+ * parameter information comes from the function prototype, it may either
+ * specify incorrect parameter names or not have names at all.
+ */
+ foreach_iter(exec_list_iterator, iter, parameters) {
+ assert(((ir_instruction *) iter.get())->as_variable() != NULL);
+
+ iter.remove();
+ delete (ir_instruction*) iter.get();
+ }
+
+ new_params->move_nodes_to(&parameters);
+}
+
+
ir_function::ir_function(const char *name)
: name(name)
{