29 #include <type_traits>
36 std::string ramProgStrOld = debug ?
toString(translationUnit.getProgram()) :
"";
40 bool changed =
transform(translationUnit);
45 translationUnit.invalidateAnalyses();
49 if (verbose && (!isA<MetaTransformer>(
this))) {
50 std::string changedString = changed ?
"changed" :
"unchanged";
51 std::cout <<
getName() <<
" time: " << std::chrono::duration<double>(end - start).count() <<
"sec ["
52 << changedString <<
"]" << std::endl;
57 translationUnit.getDebugReport().startSection();
59 translationUnit.getDebugReport().addCodeSection(
getName(),
"RAM Program after " +
getName(),
60 "ram", ramProgStrOld,
toString(translationUnit.getProgram()));
64 translationUnit.getDebugReport().endSection(
getName(),
getName() +
" " +
" (unchanged)");
69 if (translationUnit.getErrorReport().getNumErrors() != 0) {
70 std::cerr << translationUnit.getErrorReport();
71 std::cerr << translationUnit.getErrorReport().getNumErrors()
72 <<
" errors generated, evaluation aborted" << std::endl;