Ignore:
Timestamp:
Apr 28, 2015, 4:21:36 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
42e2ad7
Parents:
ad17ba6a
Message:

fixed sizeof type variable, find lowest cost alternative for sizeof expression, removed unused classes, added compiler flag, remove temporary file for -CFA, formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/Parser/DeclarationNode.cc

    rad17ba6a rbdd516a  
    55#include <cassert>
    66
    7 #include "ParseNode.h"
    87#include "TypeData.h"
    9 #include "utility.h"
    10 #include "SynTree/Declaration.h"
    118#include "SynTree/Expression.h"
    12 #include "SynTree/Initializer.h"
    13 #include "SemanticError.h"
    14 #include "UniqueName.h"
    15 #include "LinkageSpec.h"
     9
    1610
    1711using namespace std;
    1812
    19 /* these must remain in the same order as the corresponding DeclarationNode enumerations */
    20 const char *DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue" };
     13// These must remain in the same order as the corresponding DeclarationNode enumerations.
     14const char *DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue", "_Atomic" };
    2115const char *DeclarationNode::basicTypeName[] = { "char", "int", "float", "double", "void", "_Bool", "_Complex", "_Imaginary" };
    2216const char *DeclarationNode::modifierName[] = { "signed", "unsigned", "short", "long" };
     
    6761    os << string(indent, ' ' );
    6862    if ( name == "" ) {
    69 ///     os << "An unnamed ";
     63        os << "unnamed: ";
    7064    } else {
    71         os << name << ": a ";
     65        os << name << ": ";
    7266    }
    7367
     
    862856              ret = new StructInstType( type->buildQualifiers(), type->aggregate->name );
    863857              break;
    864 
    865858            case DeclarationNode::Union:
    866859              ret = new UnionInstType( type->buildQualifiers(), type->aggregate->name );
    867860              break;
    868 
    869861            case DeclarationNode::Context:
    870862              ret = new ContextInstType( type->buildQualifiers(), type->aggregate->name );
    871863              break;
    872 
    873864            default:
    874865              assert( false );
    875           }
     866          } // switch
    876867          buildList( type->aggregate->actuals, ret->get_parameters() );
    877868          return ret;
     
    884875      default:
    885876        return type->build();
    886     }
     877    } // switch
    887878}
    888879
Note: See TracChangeset for help on using the changeset viewer.