Ignore:
Timestamp:
Sep 21, 2022, 9:38:34 AM (22 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
0bd46fd
Parents:
e9e9f56
Message:

Wrote a new asForward helper for Autogen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/Autogen.cpp

    re9e9f56 r20737104  
    1010// Created On       : Thu Dec  2 13:44:00 2021
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Jan 27  9:29:00 2022
    13 // Update Count     : 1
     12// Last Modified On : Tue Sep 20 16:00:00 2022
     13// Update Count     : 2
    1414//
    1515
     
    2525
    2626#include "AST/Attribute.hpp"
     27#include "AST/Create.hpp"
    2728#include "AST/Decl.hpp"
    2829#include "AST/DeclReplacer.hpp"
     
    328329void FuncGenerator::produceForwardDecl( const ast::FunctionDecl * decl ) {
    329330        if (0 != functionNesting) return;
    330         ast::FunctionDecl * fwd = ast::deepCopy( decl );
    331         fwd->stmts = nullptr;
     331        ast::FunctionDecl * fwd =
     332                ( decl->stmts ) ? ast::asForward( decl ) : ast::deepCopy( decl ) ;
    332333        fwd->fixUniqueId();
    333334        forwards.push_back( fwd );
Note: See TracChangeset for help on using the changeset viewer.