Changes in / [0f9ceacb:d4f1521]
- Files:
-
- 3 edited
-
src/GenPoly/Lvalue.cc (modified) (3 diffs)
-
tests/.expect/references.txt (modified) (1 diff)
-
tests/references.cfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Lvalue.cc
r0f9ceacb rd4f1521 60 60 } 61 61 62 struct ReferenceConversions final : public WithStmtsToAdd , public WithGuards{62 struct ReferenceConversions final : public WithStmtsToAdd { 63 63 Expression * postmutate( CastExpr * castExpr ); 64 64 Expression * postmutate( AddressExpr * addrExpr ); … … 71 71 72 72 struct FixIntrinsicResult final : public WithGuards { 73 enum {74 NoSkip,75 Skip,76 SkipInProgress77 } skip = NoSkip;78 79 void premutate( AsmExpr * ) { GuardValue( skip ); skip = Skip; }80 void premutate( ApplicationExpr * ) { GuardValue( skip ); skip = (skip == Skip) ? SkipInProgress : NoSkip; }81 82 83 73 Expression * postmutate( ApplicationExpr * appExpr ); 84 74 void premutate( FunctionDecl * funcDecl ); … … 172 162 173 163 Expression * FixIntrinsicResult::postmutate( ApplicationExpr * appExpr ) { 174 if ( skip != SkipInProgress &&isIntrinsicReference( appExpr ) ) {164 if ( isIntrinsicReference( appExpr ) ) { 175 165 // eliminate reference types from intrinsic applications - now they return lvalues 176 166 ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result ); -
tests/.expect/references.txt
r0f9ceacb rd4f1521 36 36 3 37 37 3 9 { 1., 7. }, [1, 2, 3] 38 439 38 Destructing a Y 40 39 Destructing a Y -
tests/references.cfa
r0f9ceacb rd4f1521 119 119 f( 3, a + b, (S){ 1.0, 7.0 }, (int [3]){ 1, 2, 3 } ); // two rvalue to reference 120 120 } 121 122 {123 int a = 3;124 int *p = &a;125 asm (126 "incl %[p]\n\t" :127 : [p] "m" (*p)128 );129 printf("%d\n", a);130 }131 121 } 132 122
Note:
See TracChangeset
for help on using the changeset viewer.