Skip to content

Commit

Permalink
kaskara-clang: further reduced logging verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTimperley committed Jul 14, 2024
1 parent 02e3e49 commit 112b8e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/kaskara/clang/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ def from_dict(
live_after=frozenset(d.get("live_after", [])),
requires_syntax=frozenset(d.get("requires_syntax", [])),
)
logger.debug(f"loaded statement: {statement}")
logger.trace(f"loaded statement: {statement}")
return statement
10 changes: 5 additions & 5 deletions src/kaskara/clang/backend/src/common/ReadWriteAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void ReadWriteAnalyzer::VisitStmt(clang::Stmt const *stmt)
// stmt->dumpPretty(*ctx);
// llvm::outs() << "\n";
// stmt->dump(llvm::outs());
llvm::outs() << "[DEBUG] visiting generic stmt...\n";
// llvm::outs() << "[DEBUG] visiting generic stmt...\n";
for (clang::Stmt const *c : stmt->children()) {
if (!c)
continue;
Expand All @@ -103,7 +103,7 @@ void ReadWriteAnalyzer::VisitStmt(clang::Stmt const *stmt)

void ReadWriteAnalyzer::VisitBinaryOperator(clang::BinaryOperator const *op)
{
llvm::outs() << "[DEBUG] visiting binary operator...\n";
// llvm::outs() << "[DEBUG] visiting binary operator...\n";
VisitStmt(op);
if (!op || !op->isAssignmentOp())
return;
Expand All @@ -121,7 +121,7 @@ void ReadWriteAnalyzer::VisitBinaryOperator(clang::BinaryOperator const *op)

void ReadWriteAnalyzer::VisitDeclStmt(clang::DeclStmt const *stmt)
{
llvm::outs() << "[DEBUG] visiting decl stmt...\n";
// llvm::outs() << "[DEBUG] visiting decl stmt...\n";
VisitStmt(stmt);
for (auto const d : stmt->decls()) {
if (!d)
Expand All @@ -139,14 +139,14 @@ void ReadWriteAnalyzer::VisitDeclStmt(clang::DeclStmt const *stmt)

void ReadWriteAnalyzer::VisitMemberExpr(clang::MemberExpr const *expr)
{
llvm::outs() << "[DEBUG] visiting member expr...\n";
// llvm::outs() << "[DEBUG] visiting member expr...\n";
if (auto resolved = resolve_member_expr(expr, ctx))
reads.emplace(*resolved);
}

void ReadWriteAnalyzer::VisitDeclRefExpr(clang::DeclRefExpr const *expr)
{
llvm::outs() << "[DEBUG] visiting decl ref expr...\n";
// llvm::outs() << "[DEBUG] visiting decl ref expr...\n";
// NOTE we do not record enum values
if (auto const *var = clang::DynTypedNode::create(*expr->getDecl()).get<clang::VarDecl>())
reads.emplace(var->getNameAsString());
Expand Down

0 comments on commit 112b8e7

Please sign in to comment.