Changes in src/InitTweak/InitTweak.h [16ba4a6f:335d81f]
- File:
-
- 1 edited
-
src/InitTweak/InitTweak.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.h
r16ba4a6f r335d81f 38 38 /// returns the first parameter of a constructor/destructor/assignment function 39 39 ObjectDecl * getParamThis( FunctionType * ftype ); 40 const ast::ObjectDecl * getParamThis(const ast::FunctionDecl * func);41 40 42 41 /// generate a bitwise assignment operation. 43 42 ApplicationExpr * createBitwiseAssignment( Expression * dst, Expression * src ); 44 45 ast::Expr * createBitwiseAssignment( const ast::Expr * dst, const ast::Expr * src);46 43 47 44 /// transform Initializer into an argument list that can be passed to a call expression … … 51 48 /// True if the resolver should try to construct dwt 52 49 bool tryConstruct( DeclarationWithType * dwt ); 53 bool tryConstruct( const ast::DeclWithType * dwt );54 50 55 51 /// True if the type can have a user-defined constructor 56 52 bool isConstructable( Type * t ); 57 bool isConstructable( const ast::Type * t );58 53 59 54 /// True if the Initializer contains designations 60 55 bool isDesignated( Initializer * init ); 61 bool isDesignated( const ast::Init * init );62 56 63 57 /// True if the ObjectDecl's Initializer nesting level is not deeper than the depth of its 64 58 /// type, where the depth of its type is the number of nested ArrayTypes + 1 65 59 bool checkInitDepth( ObjectDecl * objDecl ); 66 bool checkInitDepth( const ast::ObjectDecl * objDecl );67 60 68 61 /// returns the declaration of the function called by the expr (must be ApplicationExpr or UntypedExpr) … … 86 79 /// get all Ctor/Dtor call expressions from a Statement 87 80 void collectCtorDtorCalls( Statement * stmt, std::list< Expression * > & matches ); 88 std::vector< const ast::Expr *> collectCtorDtorCalls( const ast::Stmt * stmt );81 std::vector< ast::ptr< ast::Expr > > collectCtorDtorCalls( const ast::Stmt * stmt ); 89 82 90 83 /// get the Ctor/Dtor call expression from a Statement that looks like a generated ctor/dtor call … … 109 102 bool isConstExpr( Expression * expr ); 110 103 bool isConstExpr( Initializer * init ); 111 112 bool isConstExpr( const ast::Expr * expr );113 bool isConstExpr( const ast::Init * init );114 115 /// Modifies objDecl to have:116 /// __attribute__((section (".data#")))117 /// which makes gcc put the declared variable in the data section,118 /// which is helpful for global constants on newer gcc versions,119 /// so that CFA's generated initialization won't segfault when writing it via a const cast.120 /// The trailing # is an injected assembly comment, to suppress the "a" in121 /// .section .data,"a"122 /// .section .data#,"a"123 /// to avoid assembler warning "ignoring changed section attributes for .data"124 void addDataSectonAttribute( ObjectDecl * objDecl );125 126 void addDataSectionAttribute( ast::ObjectDecl * objDecl );127 104 128 105 class InitExpander_old {
Note:
See TracChangeset
for help on using the changeset viewer.