Ignore:
Timestamp:
Dec 21, 2023, 10:21:28 AM (10 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
116d7e2
Parents:
523e300
Message:

Reorganization of Linkage::Spec. is_mangled represented two properties with is_gcc_builtin separating them in one case. The second property is_overloadable which replaces is_gcc_builtin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/LinkageSpec.cpp

    r523e300 rc7ebbec  
    2727namespace Linkage {
    2828
    29 Spec update( CodeLocation loc, Spec spec, const std::string * cmd ) {
     29Spec update( const CodeLocation & loc, Spec spec, const std::string * cmd ) {
    3030        assert( cmd );
    3131        std::unique_ptr<const std::string> guard( cmd ); // allocated by lexer
    3232        if ( *cmd == "\"Cforall\"" ) {
    33                 spec.is_mangled = true;
    34                 return spec;
     33                spec.is_mangled = spec.is_overloadable = true;
    3534        } else if ( *cmd == "\"C\"" ) {
    36                 spec.is_mangled = false;
    37                 return spec;
     35                spec.is_mangled = spec.is_overloadable = false;
    3836        } else {
    3937                SemanticError( loc, "Invalid linkage specifier %s", cmd->c_str() );
    4038        }
     39        return spec;
    4140}
    4241
Note: See TracChangeset for help on using the changeset viewer.