Changeset 312029a for src/AST/Expr.cpp


Ignore:
Timestamp:
Dec 11, 2019, 8:52:38 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
737c98a
Parents:
98d6965d
Message:

move enum Aggregate from DeclarationNode? to AggregateDecl?, add control-keyword field-dereference to replace control-keyword cast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r98d6965d r312029a  
    99// Author           : Aaron B. Moss
    1010// Created On       : Wed May 15 17:00:00 2019
    11 // Last Modified By : Andrew Beach
     11// Last Modified By : Peter A. Buhr
    1212// Created On       : Thr Jun 13 13:38:00 2019
    13 // Update Count     : 2
     13// Update Count     : 6
    1414//
    1515
     
    141141// --- KeywordCastExpr
    142142
    143 const std::string & KeywordCastExpr::targetString() const {
    144         static const std::string targetStrs[] = {
    145                 "coroutine", "thread", "monitor"
    146         };
    147         static_assert(
    148                 (sizeof(targetStrs) / sizeof(targetStrs[0])) == ((unsigned long)NUMBER_OF_TARGETS),
    149                 "Each KeywordCastExpr::Target should have a corresponding string representation"
    150         );
    151         return targetStrs[(unsigned long)target];
     143const char * KeywordCastExpr::targetString() const {
     144        return AggregateDecl::aggrString( target );
    152145}
    153146
Note: See TracChangeset for help on using the changeset viewer.