Changeset d76c588 for src/GenPoly
- Timestamp:
- May 30, 2019, 4:10:24 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8d70648
- Parents:
- eba615c
- Location:
- src/GenPoly
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.cc
reba615c rd76c588 24 24 #include <vector> // for vector 25 25 26 #include "AST/Type.hpp" 26 27 #include "GenPoly/ErasableScopedMap.h" // for ErasableScopedMap<>::const_it... 27 28 #include "ResolvExpr/typeops.h" // for flatten … … 262 263 } else { 263 264 return dynamic_cast< FunctionType* >( ty ); // pointer if FunctionType, NULL otherwise 265 } 266 } 267 268 const ast::FunctionType * getFunctionType( const ast::Type * ty ) { 269 if ( auto pty = dynamic_cast< const ast::PointerType * >( ty ) ) { 270 return pty->base.as< ast::FunctionType >(); 271 } else { 272 return dynamic_cast< const ast::FunctionType * >( ty ); 264 273 } 265 274 } -
src/GenPoly/GenPoly.h
reba615c rd76c588 20 20 21 21 #include "ErasableScopedMap.h" // for ErasableScopedMap 22 #include "AST/Fwd.hpp" 22 23 #include "SymTab/Mangler.h" // for Mangler 23 24 #include "SynTree/Declaration.h" // for TypeDecl::Data, AggregateDecl, Type... … … 72 73 /// Returns a pointer to the base FunctionType if ty is the type of a function (or pointer to one), NULL otherwise 73 74 FunctionType *getFunctionType( Type *ty ); 75 const ast::FunctionType * getFunctionType( const ast::Type * ty ); 74 76 75 77 /// If expr (after dereferencing N >= 0 pointers) is a variable expression, returns the variable expression, NULL otherwise;
Note: See TracChangeset
for help on using the changeset viewer.