Ignore:
Timestamp:
Aug 4, 2016, 4:10:06 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
4819cac
Parents:
73bf8cf2
Message:

add gcc attributes to ObjectDecl?, hoist destructed static variables, add breaks to end of generated switch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ObjectDecl.cc

    r73bf8cf2 rf9cebb5  
    1818#include "Initializer.h"
    1919#include "Expression.h"
     20#include "Attribute.h"
    2021#include "Common/utility.h"
    2122#include "Statement.h"
    2223
    23 ObjectDecl::ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, Expression *bitfieldWidth, Type *type, Initializer *init, bool isInline, bool isNoreturn )
    24         : Parent( name, sc, linkage ), type( type ), init( init ), bitfieldWidth( bitfieldWidth ) {
     24ObjectDecl::ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::list< Attribute * > attributes, bool isInline, bool isNoreturn )
     25        : Parent( name, sc, linkage, attributes ), type( type ), init( init ), bitfieldWidth( bitfieldWidth ) {
    2526        set_isInline( isInline );
    2627        set_isNoreturn( isNoreturn );
     
    4546                os << LinkageSpec::toString( get_linkage() ) << " ";
    4647        } // if
     48
     49        printAll( get_attributes(), os, indent );
    4750
    4851        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
     
    8083        } // if
    8184
     85        // xxx - should printShort print attributes?
     86
    8287        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    8388                os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
Note: See TracChangeset for help on using the changeset viewer.