Changeset 3ed994e for src/CodeGen


Ignore:
Timestamp:
May 29, 2018, 2:02:47 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
96812c0
Parents:
d807ca28
git-author:
Rob Schluntz <rschlunt@…> (05/29/18 12:29:01)
git-committer:
Rob Schluntz <rschlunt@…> (05/29/18 14:02:47)
Message:

Push deleted decls through the system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rd807ca28 r3ed994e  
    171171        // *** Declarations
    172172        void CodeGenerator::postvisit( FunctionDecl * functionDecl ) {
     173                // deleted decls should never be used, so don't print them
     174                if ( functionDecl->isDeleted && genC ) return;
    173175                extension( functionDecl );
    174176                genAttributes( functionDecl->get_attributes() );
     
    184186                        functionDecl->get_statements()->accept( *visitor );
    185187                } // if
     188                if ( functionDecl->isDeleted ) {
     189                        output << " = void";
     190                }
    186191        }
    187192
    188193        void CodeGenerator::postvisit( ObjectDecl * objectDecl ) {
     194                // deleted decls should never be used, so don't print them
     195                if ( objectDecl->isDeleted && genC ) return;
    189196                if (objectDecl->get_name().empty() && genC ) {
    190197                        // only generate an anonymous name when generating C code, otherwise it clutters the output too much
     
    205212                        objectDecl->get_init()->accept( *visitor );
    206213                } // if
     214                if ( objectDecl->isDeleted ) {
     215                        output << " = void";
     216                }
    207217
    208218                if ( objectDecl->get_bitfieldWidth() ) {
Note: See TracChangeset for help on using the changeset viewer.