Ignore:
Timestamp:
Sep 1, 2017, 2:42:12 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
51c6353
Parents:
2bf9c37
git-author:
Rob Schluntz <rschlunt@…> (09/01/17 14:41:42)
git-committer:
Rob Schluntz <rschlunt@…> (09/01/17 14:42:12)
Message:

Remove TraitDecl? prior to CodeGen?, add debug codegen for TraitDecl?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r2bf9c37 ra984e65  
    195195                }
    196196
    197                 output << kind;
    198                 if ( aggDecl->get_name() != "" )
    199                         output << aggDecl->get_name();
     197                output << kind << aggDecl->get_name();
    200198
    201199                if ( aggDecl->has_body() ) {
     
    233231                genAttributes( enumDecl->get_attributes() );
    234232
    235                 if ( enumDecl->get_name() != "" )
    236                         output << enumDecl->get_name();
     233                output << enumDecl->get_name();
    237234
    238235                std::list< Declaration* > &memb = enumDecl->get_members();
     
    260257        }
    261258
    262         void CodeGenerator::visit( __attribute__((unused)) TraitDecl * traitDecl ) {}
     259        void CodeGenerator::visit( TraitDecl * traitDecl ) {
     260                assertf( ! genC, "TraitDecl nodes should not reach code generation." );
     261                extension( traitDecl );
     262                handleAggregate( traitDecl, "trait " );
     263        }
    263264
    264265        void CodeGenerator::visit( TypedefDecl * typeDecl ) {
Note: See TracChangeset for help on using the changeset viewer.