Changeset 37273c8 for src/InitTweak
- Timestamp:
- Nov 28, 2023, 3:01:52 PM (17 months ago)
- Branches:
- master
- Children:
- ab9c1b3
- Parents:
- 4bc4b4c
- Location:
- src/InitTweak
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/InitTweak/FixGlobalInit.cc ¶
r4bc4b4c r37273c8 84 84 if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 85 85 auto initFunction = new ast::FunctionDecl(location, 86 "__global_init__", {}, {}, {}, 86 "__global_init__", {}, {}, {}, {}, 87 87 new ast::CompoundStmt(location, std::move(fixer.core.initStmts)), 88 88 ast::Storage::Static, ast::Linkage::C, … … 96 96 if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 97 97 auto destroyFunction = new ast::FunctionDecl( location, 98 "__global_destroy__", {}, {}, {}, 98 "__global_destroy__", {}, {}, {}, {}, 99 99 new ast::CompoundStmt(location, std::move(fixer.core.destroyStmts)), 100 100 ast::Storage::Static, ast::Linkage::C, -
TabularUnified src/InitTweak/FixInitNew.cpp ¶
r4bc4b4c r37273c8 74 74 fname, 75 75 std::move(typeParams), 76 {}, 76 77 {dstParam}, 77 78 {}, … … 899 900 900 901 // void __objName_dtor_atexitN(...) {...} 901 ast::FunctionDecl * dtorCaller = new ast::FunctionDecl(loc, objDecl->mangleName + dtorCallerNamer.newName(), {}, {}, {}, new ast::CompoundStmt(loc, {dtor}), ast::Storage::Static, ast::Linkage::C );902 ast::FunctionDecl * dtorCaller = new ast::FunctionDecl(loc, objDecl->mangleName + dtorCallerNamer.newName(), {}, {}, {}, {}, new ast::CompoundStmt(loc, {dtor}), ast::Storage::Static, ast::Linkage::C ); 902 903 dtorCaller->fixUniqueId(); 903 904 // dtorCaller->stmts->push_back( dtor ); -
TabularUnified src/InitTweak/InitTweak.cc ¶
r4bc4b4c r37273c8 342 342 if (!assign) { 343 343 auto td = new ast::TypeDecl(CodeLocation(), "T", {}, nullptr, ast::TypeDecl::Dtype, true); 344 assign = new ast::FunctionDecl(CodeLocation(), "?=?", {td}, 344 assign = new ast::FunctionDecl(CodeLocation(), "?=?", {td}, {}, 345 345 { new ast::ObjectDecl(CodeLocation(), "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))), 346 346 new ast::ObjectDecl(CodeLocation(), "_src", new ast::TypeInstType("T", td))},
Note: See TracChangeset
for help on using the changeset viewer.