Function fixupGlobalFunctionSymbolTable

Function fixupGlobalFunctionSymbolTable#

Function Documentation#

void fixupGlobalFunctionSymbolTable(SgFunctionTypeTable *globalFunctionTypeSymbolTable)#

Fixup the names used build the global function symbol table.

EDG builds function types using the return type and parameter types of the functions (but not the function name). Functions of the same type (function type) resolve to the same funtion type symbol. Since the names of the types are used, the qualified type names are required. Within the initial translation of the EDG AST to the Sage III AST, the template names are not prperly set (this is a fixup phase after done after the translation). At the end of the EDG/Sage III, we have a valid global function type symbol table, but it is hashed using the wrong names (that is the names of the types used to build each symbol have been modified). So the global function type symbol table must be rebuilt). Actually it might no longer really be required unless we are building more functions! But we should rebuild it. Since the symbols are already correct, all we want to do is rename the symbols, but the names are not stored in the symbols, so perhaps we don’t have to do anything, except:

  1. Suppress the error messages that complain about template names being used before they are reset (since they are used in the generation of mangled names of types).

  2. Rebuild the global table since the symbols names used to hask them into place in the table have changed and now the symbols can not be found using there new names.

\implementation