Changeset 7030dab for src/GenPoly/Lvalue.cc
- Timestamp:
- Apr 6, 2020, 4:46:28 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e3bc51c
- Parents:
- 71d6bd8 (diff), 057298e (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Lvalue.cc
r71d6bd8 r7030dab 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 17 09:11:18 201713 // Update Count : 512 // Last Modified On : Fri Dec 13 23:14:38 2019 13 // Update Count : 7 14 14 // 15 15 … … 17 17 #include <string> // for string 18 18 19 #include "Common/UniqueName.h" 19 20 #include "Common/PassVisitor.h" 20 21 #include "GenPoly.h" // for isPolyType … … 22 23 23 24 #include "InitTweak/InitTweak.h" 24 #include "Parser/LinkageSpec.h" // for Spec, isBuiltin, Intrinsic25 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, Intrinsic 29 30 #include "SynTree/Declaration.h" // for Declaration, FunctionDecl 30 31 #include "SynTree/Expression.h" // for Expression, ConditionalExpr … … 60 61 } 61 62 62 struct ReferenceConversions final : public WithStmtsToAdd {63 struct ReferenceConversions final : public WithStmtsToAdd, public WithGuards { 63 64 Expression * postmutate( CastExpr * castExpr ); 64 65 Expression * postmutate( AddressExpr * addrExpr ); … … 71 72 72 73 struct FixIntrinsicResult final : public WithGuards { 74 enum { 75 NoSkip, 76 Skip, 77 SkipInProgress 78 } skip = NoSkip; 79 80 void premutate( AsmExpr * ) { GuardValue( skip ); skip = Skip; } 81 void premutate( ApplicationExpr * ) { GuardValue( skip ); skip = (skip == Skip) ? SkipInProgress : NoSkip; } 82 83 73 84 Expression * postmutate( ApplicationExpr * appExpr ); 74 85 void premutate( FunctionDecl * funcDecl ); … … 162 173 163 174 Expression * FixIntrinsicResult::postmutate( ApplicationExpr * appExpr ) { 164 if ( isIntrinsicReference( appExpr ) ) {175 if ( skip != SkipInProgress && isIntrinsicReference( appExpr ) ) { 165 176 // eliminate reference types from intrinsic applications - now they return lvalues 166 177 ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result );
Note:
See TracChangeset
for help on using the changeset viewer.