Skip to content

Commit d024c19

Browse files
andreast271tautschnig
authored andcommitted
Enable compilation with DEBUG defined. Some of the code inside #ifdef DEBUG ... #ENDIF had become stale
1 parent 174a392 commit d024c19

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/cpp/cpp_instantiate_template.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ const symbolt &cpp_typecheckt::instantiate_template(
465465

466466
#ifdef DEBUG
467467
std::cout << "instance symbol: " << new_symb.name << "\n\n";
468-
std::cout << "template type: " << template_type << "\n\n";
468+
std::cout << "template type: " << template_type.pretty() << "\n\n";
469469
#endif
470470

471471
return new_symb;

src/cpp/cpp_typecheck_compound_type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,8 @@ void cpp_typecheckt::typecheck_friend_declaration(
894894
for(auto &sub_it : declaration.declarators())
895895
{
896896
#ifdef DEBUG
897-
std::cout << "decl: " << sub_it->pretty() << "\n with value "
898-
<< sub_it->value().pretty() << '\n';
897+
std::cout << "decl: " << sub_it.pretty() << "\n with value "
898+
<< sub_it.value().pretty() << '\n';
899899
std::cout << " scope: " << cpp_scopes.current_scope().prefix << '\n';
900900
#endif
901901
// In which scope are we going to typecheck this?

src/cpp/cpp_typecheck_expr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Author: Daniel Kroening, kroening@cs.cmu.edu
3131
#include "cpp_exception_id.h"
3232
#include "expr2cpp.h"
3333

34+
#ifdef DEBUG
35+
#include <iostream>
36+
#endif
37+
3438
bool cpp_typecheckt::find_parent(
3539
const symbolt &symb,
3640
const irep_idt &base_name,

src/cpp/cpp_typecheck_resolve.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Author: Daniel Kroening, kroening@cs.cmu.edu
1111

1212
#include "cpp_typecheck_resolve.h"
1313

14-
// #define DEBUG
15-
1614
#ifdef DEBUG
1715
#include <iostream>
1816
#endif
@@ -1416,11 +1414,11 @@ exprt cpp_typecheck_resolvet::resolve(
14161414
resolve_scope(cpp_name, base_name, template_args);
14171415

14181416
#ifdef DEBUG
1419-
std::cout << "base name: " << base_name << std::endl;
1420-
std::cout << "template args: " << template_args << std::endl;
1421-
std::cout << "original-scope: " << original_scope->prefix << std::endl;
1417+
std::cout << "base name: " << base_name << "\n";
1418+
std::cout << "template args: " << template_args.pretty() << "\n";
1419+
std::cout << "original-scope: " << original_scope->prefix << "\n";
14221420
std::cout << "scope: "
1423-
<< cpp_typecheck.cpp_scopes.current_scope().prefix << std::endl;
1421+
<< cpp_typecheck.cpp_scopes.current_scope().prefix << "\n";
14241422
#endif
14251423

14261424
const source_locationt &source_location=cpp_name.source_location();

0 commit comments

Comments
 (0)