Ignore:
Timestamp:
May 6, 2016, 3:45:23 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, gc_noraii, 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:
9e2c1f0, af18713, fac84be
Parents:
37024fd
Message:

add support for constructor/destructor attribute priority and set priority for library constructors to high

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionDecl.cc

    r37024fd r03e5d14  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 06 11:35:09 2016
     12// Last Modified On : Fri May 06 15:41:05 2016
    1313// Update Count     : 19
    1414//
     
    6565                os << "_Noreturn ";
    6666        } // if
    67         switch ( attribute ) {
    68                 case Constructor:
     67        switch ( attribute.type ) {
     68                case Attribute::Constructor:
    6969                        os << "Global Constructor ";
    7070                        break;
    71                 case Destructor:
     71                case Attribute::Destructor:
    7272                        os << "Global Destructor ";
    7373                        break;
    7474                default:
    7575                        break;
     76        }
     77        if ( attribute.priority != Attribute::Default ) {
     78                os << "with priority " << attribute.priority << " ";
    7679        }
    7780        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
     
    114117                os << "_Noreturn ";
    115118        } // if
    116         switch ( attribute ) {
    117                 case Constructor:
     119        switch ( attribute.type ) {
     120                case Attribute::Constructor:
    118121                        os << " Global Constructor ";
    119122                        break;
    120                 case Destructor:
     123                case Attribute::Destructor:
    121124                        os << " Global Destructor ";
    122125                        break;
    123126                default:
    124127                        break;
     128        }
     129        if ( attribute.priority != Attribute::Default ) {
     130                os << "with priority " << attribute.priority << " ";
    125131        }
    126132        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
Note: See TracChangeset for help on using the changeset viewer.