Changeset 4b8b2a4 for src/InitTweak/InitTweak.cc
- Timestamp:
- Oct 3, 2022, 1:46:49 PM (23 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 890f67a
- Parents:
- c02cef1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
rc02cef1 r4b8b2a4 881 881 static ast::ptr<ast::FunctionDecl> assign = nullptr; 882 882 if (!assign) { 883 auto td = new ast::TypeDecl( {}, "T", {}, nullptr, ast::TypeDecl::Dtype, true);884 assign = new ast::FunctionDecl( {}, "?=?", {},885 { new ast::ObjectDecl( {}, "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))),886 new ast::ObjectDecl( {}, "_src", new ast::TypeInstType("T", td))},887 { new ast::ObjectDecl( {}, "_ret", new ast::TypeInstType("T", td))}, nullptr, {}, ast::Linkage::Intrinsic);883 auto td = new ast::TypeDecl(CodeLocation(), "T", {}, nullptr, ast::TypeDecl::Dtype, true); 884 assign = new ast::FunctionDecl(CodeLocation(), "?=?", {}, 885 { new ast::ObjectDecl(CodeLocation(), "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))), 886 new ast::ObjectDecl(CodeLocation(), "_src", new ast::TypeInstType("T", td))}, 887 { new ast::ObjectDecl(CodeLocation(), "_ret", new ast::TypeInstType("T", td))}, nullptr, {}, ast::Linkage::Intrinsic); 888 888 } 889 889 if (dst->result.as<ast::ReferenceType>()) {
Note: See TracChangeset
for help on using the changeset viewer.