Ignore:
Timestamp:
Mar 7, 2017, 8:33:43 AM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, resolv-new, with_gc
Children:
64cb860, c3396e0
Parents:
7fe2498
Message:

change StorageClass? to bitset, support _Thread_local as separate storage-class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionDecl.cc

    r7fe2498 ra7c90d4  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar  3 21:29:41 2017
    13 // Update Count     : 55
     12// Last Modified On : Tue Mar  7 07:54:58 2017
     13// Update Count     : 68
    1414//
    1515
     
    2626extern bool translation_unit_nomain;
    2727
    28 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::list< Attribute * > attributes, DeclarationNode::FuncSpec fs )
    29                 : Parent( name, sc, linkage, attributes, fs ), type( type ), statements( statements ) {
    30         set_functionSpecifiers( fs );
    31 
     28FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::list< Attribute * > attributes, DeclarationNode::FuncSpecifiers fs )
     29        : Parent( name, scs, linkage, attributes, fs ), type( type ), statements( statements ) {
    3230        // hack forcing the function "main" to have Cforall linkage to replace main even if it is inside an extern
    3331        if ( name == "main" ) {
     
    3735
    3836FunctionDecl::FunctionDecl( const FunctionDecl &other )
    39         : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {
     37                : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {
    4038}
    4139
     
    6765        printAll( get_attributes(), os, indent );
    6866
    69         if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    70                 os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    71         } // if
     67        DeclarationNode::print_StorageClass( os, get_storageClasses() );
    7268        DeclarationNode::print_FuncSpec( os, get_funcSpec() );
    7369
     
    9591        // xxx - should printShort print attributes?
    9692
    97         if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    98                 os << DeclarationNode::storageClassNames[ get_storageClass() ] << ' ';
    99         } // if
     93        DeclarationNode::print_StorageClass( os, get_storageClasses() );
    10094        DeclarationNode::print_FuncSpec( os, get_funcSpec() );
    10195
Note: See TracChangeset for help on using the changeset viewer.