Changeset 68cd1ce for src/CodeGen


Ignore:
Timestamp:
Jun 13, 2015, 8:30:25 AM (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:
a1d5d2a
Parents:
7bcf74e
Message:

unify and fix storage class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r7bcf74e r68cd1ce  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Jun 04 15:00:00 2015
    13 // Update Count     : 125
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jun 13 07:12:27 2015
     13// Update Count     : 129
    1414//
    1515
     
    1919#include <list>
    2020
     21#include "Parser/ParseNode.h"
     22
    2123#include "SynTree/Type.h"
    22 #include "SynTree/Declaration.h"
    23 #include "SynTree/Statement.h"
    2424#include "SynTree/Expression.h"
    2525#include "SynTree/Initializer.h"
     26#include "SynTree/Statement.h"
    2627
    2728#include "utility.h"
     
    620621        void CodeGenerator::handleStorageClass( Declaration *decl ) {
    621622                switch ( decl->get_storageClass() ) {
    622                   case Declaration::NoStorageClass:
    623                         break;
    624                   case Declaration::Extern:
     623                  case DeclarationNode::Extern:
    625624                        output << "extern ";
    626625                        break;
    627                   case Declaration::Static:
     626                  case DeclarationNode::Static:
    628627                        output << "static ";
    629628                        break;
    630                   case Declaration::Auto:
     629                  case DeclarationNode::Auto:
    631630                        // silently drop storage class
    632631                        break;
    633                   case Declaration::Register:
     632                  case DeclarationNode::Register:
    634633                        output << "register ";
    635634                        break;
    636                   case Declaration::Inline:
     635                  case DeclarationNode::Inline:
    637636                        // handled as special via isInline flag (FIX)
    638637                        break;
    639                   case Declaration::Fortran:
     638                  case DeclarationNode::Fortran:
    640639                        // not handled
     640                        output << "fortran ";
     641                        break;
     642                  case DeclarationNode::Noreturn:
     643                        // not handled
     644                        output << "_Noreturn ";
     645                        break;
     646                  case DeclarationNode::Threadlocal:
     647                        // not handled
     648                        output << "_Thread_local ";
     649                        break;
     650                  case DeclarationNode::NoStorageClass:
    641651                        break;
    642652                } // switch
Note: See TracChangeset for help on using the changeset viewer.