Ignore:
Timestamp:
Jun 30, 2023, 1:48:33 PM (16 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
4bae7b4
Parents:
c9019ce (diff), 48ee593 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/LinkageSpec.cpp

    rc9019ce r599dc6a  
    2727namespace Linkage {
    2828
    29         Spec update( CodeLocation loc, Spec spec, const std::string * cmd ) {
    30                 assert( cmd );
    31                 std::unique_ptr<const std::string> guard( cmd ); // allocated by lexer
    32                 if ( *cmd == "\"Cforall\"" ) {
    33                         spec.is_mangled = true;
    34                         return spec;
    35                 } else if ( *cmd == "\"C\"" ) {
    36                         spec.is_mangled = false;
    37                         return spec;
    38                 } else {
    39                         SemanticError( loc, "Invalid linkage specifier " + *cmd );
    40                 }
     29Spec update( CodeLocation loc, Spec spec, const std::string * cmd ) {
     30        assert( cmd );
     31        std::unique_ptr<const std::string> guard( cmd ); // allocated by lexer
     32        if ( *cmd == "\"Cforall\"" ) {
     33                spec.is_mangled = true;
     34                return spec;
     35        } else if ( *cmd == "\"C\"" ) {
     36                spec.is_mangled = false;
     37                return spec;
     38        } else {
     39                SemanticError( loc, "Invalid linkage specifier " + *cmd );
    4140        }
     41}
    4242
    43 
    44         std::string name( Spec spec ) {
    45                 switch ( spec.val ) {
    46                 case Intrinsic.val:  return "intrinsic";
    47                 case C.val:          return "C";
    48                 case Cforall.val:    return "Cforall";
    49                 case AutoGen.val:    return "autogenerated cfa";
    50                 case Compiler.val:   return "compiler built-in";
    51                 case BuiltinCFA.val: return "cfa built-in";
    52                 case BuiltinC.val:   return "c built-in";
    53                 default:         return "<unnamed linkage spec>";
    54                 }
     43std::string name( Spec spec ) {
     44        switch ( spec.val ) {
     45        case Intrinsic.val:  return "intrinsic";
     46        case C.val:          return "C";
     47        case Cforall.val:    return "Cforall";
     48        case AutoGen.val:    return "autogenerated cfa";
     49        case Compiler.val:   return "compiler built-in";
     50        case BuiltinCFA.val: return "cfa built-in";
     51        case BuiltinC.val:   return "c built-in";
     52        default:             return "<unnamed linkage spec>";
    5553        }
     54}
    5655
    5756}
Note: See TracChangeset for help on using the changeset viewer.