Changeset 14a33790


Ignore:
Timestamp:
Mar 20, 2017, 3:51:39 PM (5 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
233e4d9
Parents:
946bcca
Message:

simplify unique expr names

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r946bcca r14a33790  
    534534                        } else {
    535535                                // expr isn't a call expr, so create a new temporary variable to use to hold the value of the unique expression
    536                                 unqExpr->set_object( new ObjectDecl( toString("_unq_expr_", unqExpr->get_id()), Type::StorageClasses(), LinkageSpec::C, nullptr, unqExpr->get_result()->clone(), nullptr ) );
     536                                unqExpr->set_object( new ObjectDecl( toString("_unq", unqExpr->get_id()), Type::StorageClasses(), LinkageSpec::C, nullptr, unqExpr->get_result()->clone(), nullptr ) );
    537537                                unqExpr->set_var( new VariableExpr( unqExpr->get_object() ) );
    538538                        }
  • src/Tuples/TupleExpansion.cc

    r946bcca r14a33790  
    194194                        }
    195195                        BasicType * boolType = new BasicType( Type::Qualifiers(), BasicType::Bool );
    196                         ObjectDecl * finished = new ObjectDecl( toString( "_unq_expr_finished_", id ), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::Bool ), new SingleInit( new ConstantExpr( Constant( boolType->clone(), "0" ) ), noDesignators ) );
     196                        ObjectDecl * finished = new ObjectDecl( toString( "_unq", id, "_finished_" ), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new BasicType( Type::Qualifiers(), BasicType::Bool ), new SingleInit( new ConstantExpr( Constant( boolType->clone(), "0" ) ), noDesignators ) );
    197197                        addDeclaration( finished );
    198198                        // (finished ? _unq_expr_N : (_unq_expr_N = <unqExpr->get_expr()>, finished = 1, _unq_expr_N))
Note: See TracChangeset for help on using the changeset viewer.