Changeset 41a7137 for src


Ignore:
Timestamp:
Jan 31, 2017, 4:55:59 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
511aa69a, fa2de95
Parents:
a9fc180
Message:

Added hooks for DeclStats? pass

Location:
src
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/Makefile.am

    ra9fc180 r41a7137  
    2626
    2727include CodeGen/module.mk
     28include CodeTools/module.mk
    2829include Common/module.mk
    2930include ControlStruct/module.mk
  • src/Makefile.in

    ra9fc180 r41a7137  
    2424#SRC +=  ArgTweak/Rewriter.cc \
    2525#       ArgTweak/Mutate.cc
     26
     27######################### -*- Mode: Makefile-Gmake -*- ########################
     28###############################################################################
    2629
    2730######################### -*- Mode: Makefile-Gmake -*- ########################
     
    7174build_triplet = @build@
    7275host_triplet = @host@
    73 DIST_COMMON = $(srcdir)/CodeGen/module.mk $(srcdir)/Common/module.mk \
     76DIST_COMMON = $(srcdir)/CodeGen/module.mk \
     77        $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk \
    7478        $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk \
    7579        $(srcdir)/InitTweak/module.mk $(srcdir)/Makefile.am \
     
    99103        CodeGen/driver_cfa_cpp-FixMain.$(OBJEXT) \
    100104        CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) \
     105        CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT) \
    101106        Common/driver_cfa_cpp-SemanticError.$(OBJEXT) \
    102107        Common/driver_cfa_cpp-UniqueName.$(OBJEXT) \
     
    376381        CodeGen/CodeGenerator.cc CodeGen/GenType.cc \
    377382        CodeGen/FixNames.cc CodeGen/FixMain.cc \
    378         CodeGen/OperatorTable.cc Common/SemanticError.cc \
    379         Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \
     383        CodeGen/OperatorTable.cc CodeTools/DeclStats.cc \
     384        Common/SemanticError.cc Common/UniqueName.cc \
     385        Common/DebugMalloc.cc Common/Assert.cc \
    380386        ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \
    381387        ControlStruct/MLEMutator.cc ControlStruct/Mutate.cc \
     
    440446.SUFFIXES:
    441447.SUFFIXES: .cc .ll .o .obj .yy
    442 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(am__configure_deps)
     448$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(am__configure_deps)
    443449        @for dep in $?; do \
    444450          case '$(am__configure_deps)' in \
     
    461467            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    462468        esac;
    463 $(srcdir)/CodeGen/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk:
     469$(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk:
    464470
    465471$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     
    526532CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT):  \
    527533        CodeGen/$(am__dirstamp) CodeGen/$(DEPDIR)/$(am__dirstamp)
     534CodeTools/$(am__dirstamp):
     535        @$(MKDIR_P) CodeTools
     536        @: > CodeTools/$(am__dirstamp)
     537CodeTools/$(DEPDIR)/$(am__dirstamp):
     538        @$(MKDIR_P) CodeTools/$(DEPDIR)
     539        @: > CodeTools/$(DEPDIR)/$(am__dirstamp)
     540CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT):  \
     541        CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp)
    528542Common/$(am__dirstamp):
    529543        @$(MKDIR_P) Common
     
    813827        -rm -f CodeGen/driver_cfa_cpp-Generate.$(OBJEXT)
    814828        -rm -f CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT)
     829        -rm -f CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT)
    815830        -rm -f Common/driver_cfa_cpp-Assert.$(OBJEXT)
    816831        -rm -f Common/driver_cfa_cpp-DebugMalloc.$(OBJEXT)
     
    922937@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-Generate.Po@am__quote@
    923938@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-OperatorTable.Po@am__quote@
     939@AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Po@am__quote@
    924940@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@
    925941@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po@am__quote@
     
    11481164@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeGen/driver_cfa_cpp-OperatorTable.obj `if test -f 'CodeGen/OperatorTable.cc'; then $(CYGPATH_W) 'CodeGen/OperatorTable.cc'; else $(CYGPATH_W) '$(srcdir)/CodeGen/OperatorTable.cc'; fi`
    11491165
     1166CodeTools/driver_cfa_cpp-DeclStats.o: CodeTools/DeclStats.cc
     1167@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeTools/driver_cfa_cpp-DeclStats.o -MD -MP -MF CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Tpo -c -o CodeTools/driver_cfa_cpp-DeclStats.o `test -f 'CodeTools/DeclStats.cc' || echo '$(srcdir)/'`CodeTools/DeclStats.cc
     1168@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Tpo CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Po
     1169@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='CodeTools/DeclStats.cc' object='CodeTools/driver_cfa_cpp-DeclStats.o' libtool=no @AMDEPBACKSLASH@
     1170@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1171@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeTools/driver_cfa_cpp-DeclStats.o `test -f 'CodeTools/DeclStats.cc' || echo '$(srcdir)/'`CodeTools/DeclStats.cc
     1172
     1173CodeTools/driver_cfa_cpp-DeclStats.obj: CodeTools/DeclStats.cc
     1174@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeTools/driver_cfa_cpp-DeclStats.obj -MD -MP -MF CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Tpo -c -o CodeTools/driver_cfa_cpp-DeclStats.obj `if test -f 'CodeTools/DeclStats.cc'; then $(CYGPATH_W) 'CodeTools/DeclStats.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTools/DeclStats.cc'; fi`
     1175@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Tpo CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Po
     1176@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='CodeTools/DeclStats.cc' object='CodeTools/driver_cfa_cpp-DeclStats.obj' libtool=no @AMDEPBACKSLASH@
     1177@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1178@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeTools/driver_cfa_cpp-DeclStats.obj `if test -f 'CodeTools/DeclStats.cc'; then $(CYGPATH_W) 'CodeTools/DeclStats.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTools/DeclStats.cc'; fi`
     1179
    11501180Common/driver_cfa_cpp-SemanticError.o: Common/SemanticError.cc
    11511181@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-SemanticError.o -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-SemanticError.Tpo -c -o Common/driver_cfa_cpp-SemanticError.o `test -f 'Common/SemanticError.cc' || echo '$(srcdir)/'`Common/SemanticError.cc
     
    26312661        -rm -f CodeGen/$(DEPDIR)/$(am__dirstamp)
    26322662        -rm -f CodeGen/$(am__dirstamp)
     2663        -rm -f CodeTools/$(DEPDIR)/$(am__dirstamp)
     2664        -rm -f CodeTools/$(am__dirstamp)
    26332665        -rm -f Common/$(DEPDIR)/$(am__dirstamp)
    26342666        -rm -f Common/$(am__dirstamp)
     
    26642696
    26652697distclean: distclean-am
    2666         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) Common/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
     2698        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
    26672699        -rm -f Makefile
    26682700distclean-am: clean-am distclean-compile distclean-generic \
     
    27102742
    27112743maintainer-clean: maintainer-clean-am
    2712         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) Common/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
     2744        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
    27132745        -rm -f Makefile
    27142746maintainer-clean-am: distclean-am maintainer-clean-generic
  • src/main.cc

    ra9fc180 r41a7137  
    3535#include "CodeGen/FixNames.h"
    3636#include "CodeGen/FixMain.h"
     37#include "CodeTools/DeclStats.h"
    3738#include "ControlStruct/Mutate.h"
    3839#include "SymTab/Validate.h"
     
    6162        bboxp = false,
    6263        ctorinitp = false,
     64        declstatsp = false,
    6365        exprp = false,
    6466        expraltp = false,
     
    212214                } // if
    213215
     216                if ( declstatsp ) {
     217                        CodeTools::printDeclStats( translationUnit );
     218                        deleteAll( translationUnit );
     219                        return 0;
     220                }
     221
    214222                // add the assignment statement after the initialization of a type parameter
    215223                OPTPRINT( "validate" )
     
    339347
    340348void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    341         enum { Ast, Bbox, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
     349        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
    342350
    343351        static struct option long_opts[] = {
     
    346354                { "before-resolver", no_argument, 0, Bresolver },
    347355                { "ctorinitfix", no_argument, 0, CtorInitFix },
     356                { "decl-stats", no_argument, 0, DeclStats },
    348357                { "expr", no_argument, 0, Expr },
    349358                { "expralt", no_argument, 0, ExprAlt },
     
    365374
    366375        int c;
    367         while ( (c = getopt_long( argc, argv, "abBcefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {
     376        while ( (c = getopt_long( argc, argv, "abBcdefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {
    368377                switch ( c ) {
    369378                  case Ast:
     
    381390                  case 'c':
    382391                        ctorinitp = true;
     392                        break;
     393                  case DeclStats:
     394                  case 'd':
     395                    declstatsp = true;
    383396                        break;
    384397                  case Expr:
Note: See TracChangeset for help on using the changeset viewer.