Changeset a1fbad0


Ignore:
Timestamp:
Apr 25, 2024, 11:12:12 AM (6 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
55c97e4
Parents:
03b1815
Message:

Fix in code generation. forall clauses are now printed before return types on functions. This goes not change any generated C code but will matter for some debugging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cpp

    r03b1815 ra1fbad0  
    167167        ast::Pass<CodeGenerator> subCG( acc, subOptions );
    168168        // Add the forall clause.
    169         // TODO: These probably should be removed by now and the assert used.
    170169        if ( !decl->type_params.empty() ) {
    171170                assertf( !options.genC, "FunctionDecl forall should not reach code generation." );
     
    174173                acc << ")" << std::endl;
    175174        }
     175        // The forall clause should be printed early as part of the preamble.
     176        output << acc.str();
     177        acc.str("");
    176178
    177179        acc << mangleName( decl );
Note: See TracChangeset for help on using the changeset viewer.