Changeset 1cb2282
- Timestamp:
- Aug 18, 2016, 4:59:11 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 99cad3aa
- Parents:
- 3b8e52c
- Location:
- src
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/module.mk
r3b8e52c r1cb2282 11 11 ## Created On : Mon Jun 1 17:49:17 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Mon Jun 1 17:51:23 201514 ## Update Count : 113 ## Last Modified On : Thu Aug 18 13:29:04 2016 14 ## Update Count : 2 15 15 ############################################################################### 16 16 17 17 SRC += Common/SemanticError.cc \ 18 Common/UniqueName.cc 18 Common/UniqueName.cc \ 19 Common/Assert.cc -
src/Makefile.am
r3b8e52c r1cb2282 11 11 ## Created On : Sun May 31 08:51:46 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Fri Jul 8 12:22:25201614 ## Update Count : 6 013 ## Last Modified On : Thu Aug 18 16:37:20 2016 14 ## Update Count : 68 15 15 ############################################################################### 16 16 … … 42 42 cfa_cpplib_PROGRAMS = driver/cfa-cpp 43 43 driver_cfa_cpp_SOURCES = ${SRC} 44 driver_cfa_cpp_LDADD = ${LEXLIB} # yywrap 45 # need files Common/utility.h 46 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL 47 48 AM_CXXFLAGS = -g -std=c++11 44 driver_cfa_cpp_LDADD = ${LEXLIB} # yywrap 45 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -I@CFA_PREFIX@/src/include 49 46 50 47 MAINTAINERCLEANFILES += ${libdir}/${notdir ${cfa_cpplib_PROGRAMS}} -
src/Makefile.in
r3b8e52c r1cb2282 105 105 Common/driver_cfa_cpp-SemanticError.$(OBJEXT) \ 106 106 Common/driver_cfa_cpp-UniqueName.$(OBJEXT) \ 107 Common/driver_cfa_cpp-Assert.$(OBJEXT) \ 107 108 ControlStruct/driver_cfa_cpp-LabelGenerator.$(OBJEXT) \ 108 109 ControlStruct/driver_cfa_cpp-LabelFixer.$(OBJEXT) \ … … 369 370 CodeGen/CodeGenerator.cc CodeGen/GenType.cc \ 370 371 CodeGen/FixNames.cc CodeGen/OperatorTable.cc \ 371 Common/SemanticError.cc Common/UniqueName.cc \372 Common/SemanticError.cc Common/UniqueName.cc Common/Assert.cc \ 372 373 ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \ 373 374 ControlStruct/MLEMutator.cc ControlStruct/Mutate.cc \ … … 425 426 cfa_cpplibdir = ${libdir} 426 427 driver_cfa_cpp_SOURCES = ${SRC} 427 driver_cfa_cpp_LDADD = ${LEXLIB} # yywrap428 driver_cfa_cpp_LDADD = ${LEXLIB} # yywrap 428 429 # need files Common/utility.h 429 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL 430 AM_CXXFLAGS = -g -std=c++11 430 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -I@CFA_PREFIX@/src/include 431 431 all: $(BUILT_SOURCES) 432 432 $(MAKE) $(AM_MAKEFLAGS) all-am … … 527 527 Common/$(DEPDIR)/$(am__dirstamp) 528 528 Common/driver_cfa_cpp-UniqueName.$(OBJEXT): Common/$(am__dirstamp) \ 529 Common/$(DEPDIR)/$(am__dirstamp) 530 Common/driver_cfa_cpp-Assert.$(OBJEXT): Common/$(am__dirstamp) \ 529 531 Common/$(DEPDIR)/$(am__dirstamp) 530 532 ControlStruct/$(am__dirstamp): … … 814 816 -rm -f CodeGen/driver_cfa_cpp-Generate.$(OBJEXT) 815 817 -rm -f CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) 818 -rm -f Common/driver_cfa_cpp-Assert.$(OBJEXT) 816 819 -rm -f Common/driver_cfa_cpp-SemanticError.$(OBJEXT) 817 820 -rm -f Common/driver_cfa_cpp-UniqueName.$(OBJEXT) … … 923 926 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-Generate.Po@am__quote@ 924 927 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-OperatorTable.Po@am__quote@ 928 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@ 925 929 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-SemanticError.Po@am__quote@ 926 930 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-UniqueName.Po@am__quote@ … … 1164 1168 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-UniqueName.obj `if test -f 'Common/UniqueName.cc'; then $(CYGPATH_W) 'Common/UniqueName.cc'; else $(CYGPATH_W) '$(srcdir)/Common/UniqueName.cc'; fi` 1165 1169 1170 Common/driver_cfa_cpp-Assert.o: Common/Assert.cc 1171 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-Assert.o -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-Assert.Tpo -c -o Common/driver_cfa_cpp-Assert.o `test -f 'Common/Assert.cc' || echo '$(srcdir)/'`Common/Assert.cc 1172 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-Assert.Tpo Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po 1173 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Common/Assert.cc' object='Common/driver_cfa_cpp-Assert.o' libtool=no @AMDEPBACKSLASH@ 1174 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1175 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Assert.o `test -f 'Common/Assert.cc' || echo '$(srcdir)/'`Common/Assert.cc 1176 1177 Common/driver_cfa_cpp-Assert.obj: Common/Assert.cc 1178 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Common/driver_cfa_cpp-Assert.obj -MD -MP -MF Common/$(DEPDIR)/driver_cfa_cpp-Assert.Tpo -c -o Common/driver_cfa_cpp-Assert.obj `if test -f 'Common/Assert.cc'; then $(CYGPATH_W) 'Common/Assert.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Assert.cc'; fi` 1179 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Common/$(DEPDIR)/driver_cfa_cpp-Assert.Tpo Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po 1180 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Common/Assert.cc' object='Common/driver_cfa_cpp-Assert.obj' libtool=no @AMDEPBACKSLASH@ 1181 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1182 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Common/driver_cfa_cpp-Assert.obj `if test -f 'Common/Assert.cc'; then $(CYGPATH_W) 'Common/Assert.cc'; else $(CYGPATH_W) '$(srcdir)/Common/Assert.cc'; fi` 1183 1166 1184 ControlStruct/driver_cfa_cpp-LabelGenerator.o: ControlStruct/LabelGenerator.cc 1167 1185 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ControlStruct/driver_cfa_cpp-LabelGenerator.o -MD -MP -MF ControlStruct/$(DEPDIR)/driver_cfa_cpp-LabelGenerator.Tpo -c -o ControlStruct/driver_cfa_cpp-LabelGenerator.o `test -f 'ControlStruct/LabelGenerator.cc' || echo '$(srcdir)/'`ControlStruct/LabelGenerator.cc -
src/main.cc
r3b8e52c r1cb2282 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 17 22:13:38201613 // Update Count : 34 112 // Last Modified On : Thu Aug 18 16:33:49 2016 13 // Update Count : 347 14 14 // 15 15 … … 70 70 static void dump( std::list< Declaration * > & translationUnit, std::ostream & out = std::cout ); 71 71 72 //************************************************73 74 #define __STRINGIFY__(str) #str75 #define __VSTRINGIFY__(str) __STRINGIFY__(str)76 #define assertf(expr, fmt, ...) ((expr) ? static_cast<void>(0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))77 #define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\": "78 79 extern const char * __progname; // global name of running executable (argv[0])80 // called by macro assert in assert.h81 void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {82 fprintf( stderr, CFA_ASSERT_FMT, __progname, function, line, file );83 exit( EXIT_FAILURE );84 }85 86 #include <cstdarg>87 // called by macro assertf88 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) {89 fprintf( stderr, CFA_ASSERT_FMT, __progname, function, line, file );90 va_list args;91 va_start( args, fmt );92 vfprintf( stderr, fmt, args );93 exit( EXIT_FAILURE );94 }95 96 //************************************************97 98 72 int main( int argc, char * argv[] ) { 99 73 FILE * input; // use FILE rather than istream because yyin is FILE … … 408 382 } // dump 409 383 410 411 412 384 // Local Variables: // 413 385 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.