Changeset 274ce8c for src/ControlStruct


Ignore:
Timestamp:
Aug 17, 2017, 5:37:26 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:
4cc585b, 8bafacc
Parents:
6d49ea3 (diff), 8f6dfe7 (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 plg2:software/cfa/cfa-cc

Location:
src/ControlStruct
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/ExceptTranslate.cc

    r6d49ea3 r274ce8c  
    1010// Created On       : Wed Jun 14 16:49:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tus Aug  8 16:54:00 2017
    13 // Update Count     : 7
     12// Last Modified On : Thr Aug 17 17:19:00 2017
     13// Update Count     : 9
    1414//
    1515
     
    166166                        /*bitfieldWidth*/ NULL,
    167167                        new BasicType( noQualifiers, BasicType::Bool ),
    168                         /*init*/ NULL
     168                        /*init*/ NULL,
     169                        std::list<Attribute *>{ new Attribute( "unused" ) }
    169170                        );
    170171                ObjectDecl voidptr_obj(
     
    183184                        );
    184185
     186                ObjectDecl * unused_index_obj = index_obj.clone();
     187                unused_index_obj->attributes.push_back( new Attribute( "unused" ) );
     188
    185189                catch_func_t.get_parameters().push_back( index_obj.clone() );
    186190                catch_func_t.get_parameters().push_back( exception_obj.clone() );
    187                 match_func_t.get_returnVals().push_back( index_obj.clone() );
     191                match_func_t.get_returnVals().push_back( unused_index_obj );
    188192                match_func_t.get_parameters().push_back( exception_obj.clone() );
    189193                handle_func_t.get_returnVals().push_back( bool_obj.clone() );
     
    417421                }
    418422
    419                 body->push_back( new ReturnStmt( noLabels, new ConstantExpr(
    420                         Constant::from_int( 0 ) ) ) );
     423                body->push_back( new ReturnStmt( noLabels,
     424                        new ConstantExpr( Constant::from_int( 0 ) ) ) );
    421425
    422426                return new FunctionDecl("match", Type::StorageClasses(),
     
    449453                CompoundStmt * body = new CompoundStmt( noLabels );
    450454
    451                 FunctionType * func_type = match_func_t.clone();
     455                FunctionType * func_type = handle_func_t.clone();
    452456                DeclarationWithType * except_obj = func_type->get_parameters().back();
    453457
     
    472476                }
    473477
    474                 body->push_back( new ReturnStmt( noLabels, new ConstantExpr(
    475                         Constant::from_bool( false ) ) ) );
     478                body->push_back( new ReturnStmt( noLabels,
     479                        new ConstantExpr( Constant::from_bool( false ) ) ) );
    476480
    477481                return new FunctionDecl("handle", Type::StorageClasses(),
  • src/ControlStruct/LabelGenerator.cc

    r6d49ea3 r274ce8c  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jun 23 12:18:34 2015
    13 // Update Count     : 13
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr Aug 14 14:14:00 2015
     13// Update Count     : 14
    1414//
    1515
    16 #include <iostream>             // for operator<<, basic_ostream, ostringstream
     16#include <iostream>             // for operator<<, basic_ostream
     17#include <sstream>              // for ostringstream
    1718#include <list>                 // for list
    1819
Note: See TracChangeset for help on using the changeset viewer.