Changeset 357390f


Ignore:
Timestamp:
Aug 5, 2019, 7:34:04 AM (5 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:
f1da02c
Parents:
05c27fc
Message:

formatting

Location:
src/SynTree
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/BasicType.cc

    r05c27fc r357390f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jan 31 21:37:36 2019
    13 // Update Count     : 12
     12// Last Modified On : Sun Aug  4 21:07:44 2019
     13// Update Count     : 13
    1414//
    1515
     
    3131bool BasicType::isInteger() const {
    3232        return kind <= UnsignedInt128;
    33 #if 0
    34         switch ( kind ) {
    35           case Bool:
    36           case Char:
    37           case SignedChar:
    38           case UnsignedChar:
    39           case ShortSignedInt:
    40           case ShortUnsignedInt:
    41           case SignedInt:
    42           case UnsignedInt:
    43           case LongSignedInt:
    44           case LongUnsignedInt:
    45           case LongLongSignedInt:
    46           case LongLongUnsignedInt:
    47           case SignedInt128:
    48           case UnsignedInt128:
    49                 return true;
    50           case Float:
    51           case Double:
    52           case LongDouble:
    53           case FloatComplex:
    54           case DoubleComplex:
    55           case LongDoubleComplex:
    56           case FloatImaginary:
    57           case DoubleImaginary:
    58           case LongDoubleImaginary:
    59           case Float80:
    60           case Float128:
    61                 return false;
    62           case NUMBER_OF_BASIC_TYPES:
    63                 assert( false );
    64         } // switch
    65         assert( false );
    66         return false;
    67 #endif
    6833}
    6934
  • src/SynTree/Type.cc

    r05c27fc r357390f  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jul 12 15:48:00 2019
    13 // Update Count     : 44
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Aug  4 21:05:07 2019
     13// Update Count     : 45
    1414//
    1515#include "Type.h"
     
    2424using namespace std;
    2525
    26 const char *BasicType::typeNames[] = {
    27 #if 0
    28         "_Bool",
    29         "char",
    30         "signed char",
    31         "unsigned char",
    32         "signed short int",
    33         "unsigned short int",
    34         "signed int",
    35         "unsigned int",
    36         "signed long int",
    37         "unsigned long int",
    38         "signed long long int",
    39         "unsigned long long int",
    40         "float",
    41         "double",
    42         "long double",
    43         "float _Complex",
    44         "double _Complex",
    45         "long double _Complex",
    46         "float _Imaginary",
    47         "double _Imaginary",
    48         "long double _Imaginary",
    49         "__int128",
    50         "unsigned __int128",
    51         "__float80",
    52         "__float128",
    53         "_Float16",
    54         "_Float32",
    55         "_Float32x",
    56         "_Float64",
    57         "_Float64x",
    58         "_Float128",
    59         "_Float128x",
    60         "_Float16 _Complex",
    61         "_Float32 _Complex",
    62         "_Float32x _Complex",
    63         "_Float64 _Complex",
    64         "_Float64x _Complex",
    65         "_Float128 _Complex",
    66         "_Float128x _Complex",
    67 #endif
     26const char * BasicType::typeNames[] = {
    6827        "_Bool",
    6928        "char",
     
    10766};
    10867static_assert(
    109         sizeof(BasicType::typeNames)/sizeof(BasicType::typeNames[0]) == BasicType::NUMBER_OF_BASIC_TYPES,
     68        sizeof(BasicType::typeNames) / sizeof(BasicType::typeNames[0]) == BasicType::NUMBER_OF_BASIC_TYPES,
    11069        "Each basic type name should have a corresponding kind enum value"
    11170);
     
    152111TypeSubstitution Type::genericSubstitution() const { assertf( false, "Non-aggregate type: %s", toCString( this ) ); }
    153112
    154 void Type::print( std::ostream &os, Indenter indent ) const {
     113void Type::print( std::ostream & os, Indenter indent ) const {
    155114        if ( ! forall.empty() ) {
    156115                os << "forall" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.