Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionDecl.cc

    r4e24610 rd3b7937  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FunctionDecl.cc --
     7// FunctionDecl.cc -- 
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 06 11:35:09 2016
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jul 13 18:11:44 2015
    1313// Update Count     : 19
    1414//
     
    2121#include "Common/utility.h"
    2222
    23 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, Attribute attribute )
    24                 : Parent( name, sc, linkage ), type( type ), statements( statements ), attribute( attribute ) {
     23FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn )
     24                : Parent( name, sc, linkage ), type( type ), statements( statements ) {
    2525        set_isInline( isInline );
    2626        set_isNoreturn( isNoreturn );
     
    3232
    3333FunctionDecl::FunctionDecl( const FunctionDecl &other )
    34         : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ), attribute( other.attribute ) {
     34        : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {
    3535}
    3636
     
    5252        using std::endl;
    5353        using std::string;
    54 
     54       
    5555        if ( get_name() != "" ) {
    5656                os << get_name() << ": ";
     
    6565                os << "_Noreturn ";
    6666        } // if
    67         switch ( attribute ) {
    68                 case Constructor:
    69                         os << "Global Constructor ";
    70                         break;
    71                 case Destructor:
    72                         os << "Global Destructor ";
    73                         break;
    74                 default:
    75                         break;
    76         }
    7767        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    7868                os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     
    10494        using std::endl;
    10595        using std::string;
    106 
     96       
    10797        if ( get_name() != "" ) {
    10898                os << get_name() << ": ";
     
    114104                os << "_Noreturn ";
    115105        } // if
    116         switch ( attribute ) {
    117                 case Constructor:
    118                         os << " Global Constructor ";
    119                         break;
    120                 case Destructor:
    121                         os << " Global Destructor ";
    122                         break;
    123                 default:
    124                         break;
    125         }
    126106        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    127107                os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
Note: See TracChangeset for help on using the changeset viewer.