Ignore:
Timestamp:
Feb 9, 2017, 5:31:49 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
132fad4
Parents:
9e45e46 (diff), e994912 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r9e45e46 ra073d46  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Feb  6 16:01:29 2017
    13 // Update Count     : 739
     12// Last Modified On : Thu Feb  9 14:48:40 2017
     13// Update Count     : 741
    1414//
    1515
     
    5656                asmName( nullptr ),
    5757                initializer( nullptr ),
    58                 extension( false ) {
     58                extension( false ),
     59                asmStmt( nullptr ) {
    5960
    6061//      variable.name = nullptr;
     
    7778        delete type;
    7879        delete bitfieldWidth;
     80
     81        delete asmStmt;
    7982        // asmName, no delete, passed to next stage
    8083        delete initializer;
     
    98101        newnode->initializer = maybeClone( initializer );
    99102        newnode->extension = extension;
     103        newnode->asmStmt = maybeClone( asmStmt );
    100104        newnode->error = error;
    101105
     
    411415        newnode->attributes.push_back( new Attribute( *name, exprs ) );
    412416        delete name;
     417        return newnode;
     418}
     419
     420DeclarationNode * DeclarationNode::newAsmStmt( StatementNode * stmt ) {
     421        DeclarationNode * newnode = new DeclarationNode;
     422        newnode->asmStmt = stmt;
    413423        return newnode;
    414424}
     
    980990Declaration * DeclarationNode::build() const {
    981991        if ( ! error.empty() ) throw SemanticError( error + " in declaration of ", this );
     992
     993        if ( asmStmt ) {
     994                return new AsmDecl( safe_dynamic_cast<AsmStmt *>( asmStmt->build() ) );
     995        } // if
    982996
    983997//      if ( variable.name ) {
Note: See TracChangeset for help on using the changeset viewer.