Changes in src/GenPoly/Lvalue.cc [9306559f:b4f8808]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Lvalue.cc
r9306559f rb4f8808 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Dec 13 23:14:38 201913 // Update Count : 712 // Last Modified On : Fri Mar 17 09:11:18 2017 13 // Update Count : 5 14 14 // 15 15 … … 17 17 #include <string> // for string 18 18 19 #include "Common/UniqueName.h"20 19 #include "Common/PassVisitor.h" 21 20 #include "GenPoly.h" // for isPolyType … … 23 22 24 23 #include "InitTweak/InitTweak.h" 24 #include "Parser/LinkageSpec.h" // for Spec, isBuiltin, Intrinsic 25 25 #include "ResolvExpr/TypeEnvironment.h" // for AssertionSet, OpenVarSet 26 26 #include "ResolvExpr/Unify.h" // for unify 27 27 #include "ResolvExpr/typeops.h" 28 28 #include "SymTab/Indexer.h" // for Indexer 29 #include "SynTree/LinkageSpec.h" // for Spec, isBuiltin, Intrinsic30 29 #include "SynTree/Declaration.h" // for Declaration, FunctionDecl 31 30 #include "SynTree/Expression.h" // for Expression, ConditionalExpr … … 61 60 } 62 61 63 struct ReferenceConversions final : public WithStmtsToAdd , public WithGuards{62 struct ReferenceConversions final : public WithStmtsToAdd { 64 63 Expression * postmutate( CastExpr * castExpr ); 65 64 Expression * postmutate( AddressExpr * addrExpr ); … … 72 71 73 72 struct FixIntrinsicResult final : public WithGuards { 74 enum {75 NoSkip,76 Skip,77 SkipInProgress78 } skip = NoSkip;79 80 void premutate( AsmExpr * ) { GuardValue( skip ); skip = Skip; }81 void premutate( ApplicationExpr * ) { GuardValue( skip ); skip = (skip == Skip) ? SkipInProgress : NoSkip; }82 83 84 73 Expression * postmutate( ApplicationExpr * appExpr ); 85 74 void premutate( FunctionDecl * funcDecl ); … … 173 162 174 163 Expression * FixIntrinsicResult::postmutate( ApplicationExpr * appExpr ) { 175 if ( skip != SkipInProgress &&isIntrinsicReference( appExpr ) ) {164 if ( isIntrinsicReference( appExpr ) ) { 176 165 // eliminate reference types from intrinsic applications - now they return lvalues 177 166 ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result );
Note:
See TracChangeset
for help on using the changeset viewer.