glsl2: Remove unnecessary glsl_symbol_table::get_function parameter return_constructors
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 1 Sep 2010 21:16:53 +0000 (14:16 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 2 Sep 2010 03:39:09 +0000 (20:39 -0700)
Now that constructors are not generated as functions or stored in the
symbol table, there is no need to flag whether or not constructors
should be returned.

src/glsl/ast_to_hir.cpp
src/glsl/glsl_symbol_table.cpp
src/glsl/glsl_symbol_table.h

index 970ac0818e8933c2c68bbc81ee7f8a35b328ed4a..5bdf3da3676cb10e017d940565f1d968b8573ec2 100644 (file)
@@ -2257,7 +2257,7 @@ ast_function::hir(exec_list *instructions,
     * seen signature for a function with the same name, or, if a match is found,
     * that the previously seen signature does not have an associated definition.
     */
-   f = state->symbols->get_function(name, false);
+   f = state->symbols->get_function(name);
    if (f != NULL && !f->is_builtin) {
       sig = f->exact_matching_signature(&hir_parameters);
       if (sig != NULL) {
index b56b087530d45afb68db90be84796abf5e338dd1..e9bf89b951df246cf312dbd9d75383f8290c0239 100644 (file)
@@ -147,15 +147,10 @@ const glsl_type *glsl_symbol_table::get_type(const char *name)
    return entry != NULL ? entry->t : NULL;
 }
 
-ir_function *glsl_symbol_table::get_function(const char *name,
-                                            bool return_constructors)
+ir_function *glsl_symbol_table::get_function(const char *name)
 {
    symbol_table_entry *entry = get_entry(name);
-   // If there's a type, the function is a constructor; caller may not want it.
-   if (entry != NULL && (return_constructors || entry->t == NULL))
-      return entry->f;
-
-   return NULL;
+   return entry != NULL ? entry->f : NULL;
 }
 
 symbol_table_entry *glsl_symbol_table::get_entry(const char *name)
index f1369b52c837d715eaf7509fa999ea98a035fd41..f26de52432574e00d20e8642c535ebc1fd047964 100644 (file)
@@ -108,7 +108,7 @@ public:
    /*@{*/
    ir_variable *get_variable(const char *name);
    const glsl_type *get_type(const char *name);
-   ir_function *get_function(const char *name, bool return_constructors = true);
+   ir_function *get_function(const char *name);
    /*@}*/
 
 private: