Ignore:
Timestamp:
Jul 5, 2024, 11:43:23 AM (5 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
550afde2
Parents:
8c55d34
Message:

Made string literals constants. Preformed required updates. Resisted preforming large refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/ImplementEnumFunc.cpp

    r8c55d34 rc2cf2d0  
    187187                {new ast::ObjectDecl(
    188188                        getLocation(), "_ret",
    189                         new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}))});
     189                        new ast::PointerType(
     190                                new ast::BasicType(ast::BasicKind::Char, ast::CV::Const)))});
    190191}
    191192
     
    231232                {new ast::ObjectDecl(
    232233                        getLocation(), "_ret",
    233                         new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}))});
     234                        new ast::PointerType(
     235                                new ast::BasicType(ast::BasicKind::Char, ast::CV::Const)))});
    234236}
    235237
     
    343345                attr == ast::EnumAttribute::Value
    344346                        ? decl->base
    345                         : new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}),
     347                        : new ast::PointerType(
     348                                new ast::BasicType(ast::BasicKind::Char, ast::CV::Const)),
    346349                ast::ConstantExpr::from_int(decl->location, decl->members.size()),
    347350                ast::LengthFlag::FixedLen, ast::DimensionFlag::DynamicDim);
Note: See TracChangeset for help on using the changeset viewer.