* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdlib>
-#include <cstdio>
-#include <cstdarg>
-
#include "main/core.h"
#include "glsl_symbol_table.h"
#include "glsl_parser_extras.h"
* details that may be missing.
*/
ir_function *f = linked->symbols->get_function(name);
- if (f == NULL)
+ if (f == NULL) {
f = new(linked) ir_function(name);
+ /* Add the new function to the linked IR.
+ */
+ linked->symbols->add_function(f);
+ linked->ir->push_head(f);
+ }
+
ir_function_signature *linked_sig =
f->exact_matching_signature(&callee->parameters);
if (linked_sig == NULL) {