Changeset 02fdb8e for src/Common
- Timestamp:
- May 7, 2019, 1:39:08 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- cedb545
- Parents:
- 0c0f548
- Location:
- src/Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Common/PassVisitor.h ¶
r0c0f548 r02fdb8e 4 4 5 5 #include <stack> 6 #include <type_traits> 6 7 7 8 #include "Common/Stats.h" … … 301 302 302 303 303 TypeSubstitution ** get_env_ptr () { return env_impl( pass, 0); }304 auto get_env_ptr () -> decltype(env_impl( pass, 0)) { return env_impl( pass, 0); } 304 305 std::list< Statement* > * get_beforeStmts() { return stmtsToAddBefore_impl( pass, 0); } 305 306 std::list< Statement* > * get_afterStmts () { return stmtsToAddAfter_impl ( pass, 0); } … … 348 349 }; 349 350 351 class WithConstTypeSubstitution { 352 protected: 353 WithConstTypeSubstitution() = default; 354 ~WithConstTypeSubstitution() = default; 355 356 public: 357 const TypeSubstitution * env = nullptr; 358 }; 359 350 360 class WithStmtsToAdd { 351 361 protected: -
TabularUnified src/Common/PassVisitor.impl.h ¶
r0c0f548 r02fdb8e 253 253 254 254 // don't want statements from outer CompoundStmts to be added to this CompoundStmt 255 ValueGuardPtr< TypeSubstitution * > oldEnv ( get_env_ptr() );255 ValueGuardPtr< typename std::remove_pointer<decltype(get_env_ptr())>::type > oldEnv( get_env_ptr() ); 256 256 ValueGuardPtr< DeclList_t > oldBeforeDecls( get_beforeDecls() ); 257 257 ValueGuardPtr< DeclList_t > oldAfterDecls ( get_afterDecls () ); … … 1995 1995 1996 1996 // don't want statements from outer CompoundStmts to be added to this StmtExpr 1997 ValueGuardPtr< TypeSubstitution * > oldEnv( get_env_ptr() );1997 ValueGuardPtr< typename std::remove_pointer<decltype(get_env_ptr())>::type > oldEnv( get_env_ptr() ); 1998 1998 ValueGuardPtr< std::list< Statement* > > oldBeforeStmts( get_beforeStmts() ); 1999 1999 ValueGuardPtr< std::list< Statement* > > oldAfterStmts ( get_afterStmts () ); … … 2012 2012 2013 2013 // don't want statements from outer CompoundStmts to be added to this StmtExpr 2014 ValueGuardPtr< TypeSubstitution * > oldEnv( get_env_ptr() );2014 ValueGuardPtr< typename std::remove_pointer<decltype(get_env_ptr())>::type > oldEnv( get_env_ptr() ); 2015 2015 ValueGuardPtr< std::list< Statement* > > oldBeforeStmts( get_beforeStmts() ); 2016 2016 ValueGuardPtr< std::list< Statement* > > oldAfterStmts ( get_afterStmts () ); -
TabularUnified src/Common/PassVisitor.proto.h ¶
r0c0f548 r02fdb8e 165 165 static inline type * name##_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) long unused ) { return nullptr;} \ 166 166 167 FIELD_PTR( TypeSubstitution *, env )167 FIELD_PTR( const TypeSubstitution *, env ) 168 168 FIELD_PTR( std::list< Statement* >, stmtsToAddBefore ) 169 169 FIELD_PTR( std::list< Statement* >, stmtsToAddAfter )
Note: See TracChangeset
for help on using the changeset viewer.