Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionDecl.cc

    r7baed7d 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 15:59:48 2016
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jul 13 18:11:44 2015
    1313// Update Count     : 19
    1414//
     
    1919#include "Statement.h"
    2020#include "Type.h"
    21 #include "Attribute.h"
    2221#include "Common/utility.h"
    2322
    24 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, std::list< Attribute * > attributes )
    25                 : Parent( name, sc, linkage ), type( type ), statements( statements ), attributes( attributes ) {
     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 ) {
    2625        set_isInline( isInline );
    2726        set_isNoreturn( isNoreturn );
     
    3433FunctionDecl::FunctionDecl( const FunctionDecl &other )
    3534        : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {
    36                 cloneAll( other.attributes, attributes );
    3735}
    3836
     
    4038        delete type;
    4139        delete statements;
    42         deleteAll( attributes );
    4340}
    4441
     
    5552        using std::endl;
    5653        using std::string;
    57 
     54       
    5855        if ( get_name() != "" ) {
    5956                os << get_name() << ": ";
     
    6865                os << "_Noreturn ";
    6966        } // if
    70 
    71         printAll( attributes, os, indent );
    72 
    7367        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    7468                os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
     
    9387        if ( statements ) {
    9488                os << string( indent + 2, ' ' ) << "with body " << endl;
    95                 os << string( indent + 4, ' ' );
    9689                statements->print( os, indent + 4 );
    9790        } // if
     
    10194        using std::endl;
    10295        using std::string;
    103 
     96       
    10497        if ( get_name() != "" ) {
    10598                os << get_name() << ": ";
     
    111104                os << "_Noreturn ";
    112105        } // if
    113 
    114         // xxx - should printShort print attributes?
    115 
    116106        if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
    117107                os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
Note: See TracChangeset for help on using the changeset viewer.