Changeset 92fea32


Ignore:
Timestamp:
Apr 3, 2018, 11:13:41 AM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, 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, with_gc
Children:
bd87b138
Parents:
f6e3e34
Message:

Add codegen for _Static_assert

Location:
src/CodeGen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rf6e3e34 r92fea32  
    298298                        output << " }";
    299299                }
     300        }
     301
     302        void CodeGenerator::postvisit( StaticAssertDecl * assertDecl ) {
     303                output << "_Static_assert(";
     304                assertDecl->condition->accept( *visitor );
     305                output << ", ";
     306                assertDecl->message->accept( *visitor );
     307                output << ")";
    300308        }
    301309
  • src/CodeGen/CodeGenerator.h

    rf6e3e34 r92fea32  
    4242                void postvisit( FunctionDecl * );
    4343                void postvisit( ObjectDecl * );
    44                 void postvisit( UnionDecl *aggregateDecl );
    45                 void postvisit( EnumDecl *aggregateDecl );
    46                 void postvisit( TraitDecl *aggregateDecl );
    47                 void postvisit( TypedefDecl *typeDecl );
    48                 void postvisit( TypeDecl *typeDecl );
     44                void postvisit( UnionDecl * aggregateDecl );
     45                void postvisit( EnumDecl * aggregateDecl );
     46                void postvisit( TraitDecl * aggregateDecl );
     47                void postvisit( TypedefDecl * typeDecl );
     48                void postvisit( TypeDecl * typeDecl );
     49                void postvisit( StaticAssertDecl * assertDecl );
    4950
    5051                //*** Initializer
Note: See TracChangeset for help on using the changeset viewer.