mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 19:00:13 +01:00
glsl2: Remove unnecessary glsl_symbol_table::get_function parameter return_constructors
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.
This commit is contained in:
parent
4d6221f90d
commit
e466b182bb
3 changed files with 4 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue