Changeset 90152a4 for src/Common/Debug.h
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/Debug.h
rf9feab8 r90152a4 28 28 namespace Debug { 29 29 /// debug codegen a translation unit 30 static inline void codeGen( __attribute__((unused)) const std::list< Declaration * > & translationUnit, __attribute__((unused)) const std::string & label ) {30 static inline void codeGen( __attribute__((unused)) const std::list< Declaration * > & translationUnit, __attribute__((unused)) const std::string & label, __attribute__((unused)) LinkageSpec::Spec linkageFilter = LinkageSpec::Builtin ) { 31 31 #ifdef DEBUG 32 32 std::list< Declaration * > decls; 33 33 34 filter( translationUnit.begin(), translationUnit.end(), back_inserter( decls ), [ ]( Declaration * decl ) {35 return ! LinkageSpec::isBuiltin( decl->get_linkage());34 filter( translationUnit.begin(), translationUnit.end(), back_inserter( decls ), [linkageFilter]( Declaration * decl ) { 35 return ! (decl->linkage & linkageFilter); 36 36 }); 37 37 38 38 std::cerr << "======" << label << "======" << std::endl; 39 CodeGen::generate( decls, std::cerr, false, true ); 39 CodeGen::generate( 40 decls, 41 std::cerr, 42 true /* doIntrinsics */, 43 true /* pretty */, 44 false /* generateC */, 45 false /* lineMarks */, 46 true /* printTypeExpr */ 47 ); 40 48 #endif 41 49 } // dump 42 50 43 static inline void treeDump( __attribute__((unused)) const std::list< Declaration * > & translationUnit, __attribute__((unused)) const std::string & label ) {51 static inline void treeDump( __attribute__((unused)) const std::list< Declaration * > & translationUnit, __attribute__((unused)) const std::string & label, __attribute__((unused)) LinkageSpec::Spec linkageFilter = LinkageSpec::Compiler ) { 44 52 #ifdef DEBUG 45 53 std::list< Declaration * > decls; 46 54 47 filter( translationUnit.begin(), translationUnit.end(), back_inserter( decls ), [ ]( Declaration * decl ) {48 return ! LinkageSpec::isBuiltin( decl->get_linkage());55 filter( translationUnit.begin(), translationUnit.end(), back_inserter( decls ), [linkageFilter]( Declaration * decl ) { 56 return ! (decl->linkage & linkageFilter); 49 57 }); 50 58
Note:
See TracChangeset
for help on using the changeset viewer.