Changeset 934fa0f for src/CodeGen


Ignore:
Timestamp:
Nov 7, 2023, 2:25:25 PM (14 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
790d835
Parents:
0589e83
Message:

Translated the demangling code from the old ast to the new ast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    r0589e83 r934fa0f  
    2323#include "CodeGenerator.h"        // for CodeGenerator
    2424#include "CodeGeneratorNew.hpp"   // for CodeGenerator_new
     25#include "Common/UniqueName.h"    // for UniqueName
    2526#include "SynTree/Declaration.h"  // for DeclarationWithType
    2627#include "SynTree/Expression.h"   // for Expression
     
    662663        if ( cur == end ) return "";
    663664        std::ostringstream oss;
    664         for ( unsigned int i = 0 ; ; ++i ) {
    665                 oss << genType( *cur++, "__param_" + std::to_string(i), options );
     665        UniqueName param( "__param_" );
     666        while ( true ) {
     667                oss << genType( *cur++, options.genC ? param.newName() : "", options );
    666668                if ( cur == end ) break;
    667669                oss << ", ";
Note: See TracChangeset for help on using the changeset viewer.