Ignore:
Timestamp:
Dec 13, 2016, 3:14:59 PM (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:
04c8bba
Parents:
2ee5426
Message:

add asm_name clause to declarations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    r2ee5426 r58dd019  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 24 11:14:26 2016
    13 // Update Count     : 415
     12// Last Modified On : Tue Dec 13 13:40:33 2016
     13// Update Count     : 420
    1414//
    1515
     
    721721} // buildTypeof
    722722
    723 Declaration * buildDecl( const TypeData * td, const string &name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer * init ) {
     723Declaration * buildDecl( const TypeData * td, const string &name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, ConstantExpr *asmName, Initializer * init ) {
    724724        if ( td->kind == TypeData::Function ) {
    725725                FunctionDecl * decl;
     
    743743                } // for
    744744                buildList( td->function.oldDeclList, decl->get_oldDecls() );
    745                 return decl;
     745                return decl->set_asmName( asmName );
    746746        } else if ( td->kind == TypeData::Aggregate ) {
    747747                return buildAggregate( td );
     
    751751                return buildSymbolic( td, name, sc );
    752752        } else {
    753                 return new ObjectDecl( name, sc, linkage, bitfieldWidth, typebuild( td ), init, list< Attribute * >(), isInline, isNoreturn );
     753                return (new ObjectDecl( name, sc, linkage, bitfieldWidth, typebuild( td ), init, list< Attribute * >(), isInline, isNoreturn ))->set_asmName( asmName );
    754754        } // if
    755755        return nullptr;
     
    769769                        break;
    770770                  default:
    771                         ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( buildDecl( td->base,  "", DeclarationNode::NoStorageClass, nullptr, false, false, LinkageSpec::Cforall ) ) );
     771                        ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( buildDecl( td->base,  "", DeclarationNode::NoStorageClass, nullptr, false, false, LinkageSpec::Cforall, nullptr ) ) );
    772772                } // switch
    773773        } else {
Note: See TracChangeset for help on using the changeset viewer.