Ignore:
Timestamp:
Sep 5, 2017, 3:41:04 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
416cc86
Parents:
800d275 (diff), 3f8dd01 (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/CodeGen/OperatorTable.cc

    r800d275 r235b41f  
    1919
    2020#include "OperatorTable.h"
     21#include "Common/utility.h"
    2122
    2223namespace CodeGen {
     
    6566                        {       "?^=?",         "^=",   "_operator_bitxorassign",               OT_INFIXASSIGN          },
    6667                        {       "?|=?",         "|=",   "_operator_bitorassign",                OT_INFIXASSIGN          },
    67                         {       "&&",           "&&",   "&&",                                                   OT_LABELADDRESS         },
    68                         {       "0",            "0",    "_constant_zero",                               OT_CONSTANT                     },
    69                         {       "1",            "1",    "_constant_one",                                OT_CONSTANT                     }
    7068                };
    7169
     
    8684                        initialize();
    8785                } // if
     86
    8887                std::map< std::string, OperatorInfo >::const_iterator i = table.find( funcName );
    8988                if ( i == table.end() ) {
     89                        if ( isPrefix( funcName, "?`" ) ) {
     90                                // handle literal suffixes, which are user-defined postfix operators
     91                                info.inputName = funcName;
     92                                info.symbol = funcName.substr(2);
     93                                info.outputName = toString( "__operator_literal_", info.symbol );
     94                                info.type = OT_POSTFIX;
     95                                return true;
     96                        }
    9097                        return false;
    9198                } else {
Note: See TracChangeset for help on using the changeset viewer.