From 9b15cb5ab10ff29bed7afeb6520f4b3844f73bad Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 20 Jul 2019 14:34:22 +0800 Subject: dump_hirfile - Fix publicity handling --- tools/dump_hirfile/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/dump_hirfile/main.cpp') diff --git a/tools/dump_hirfile/main.cpp b/tools/dump_hirfile/main.cpp index 8cdf1691..47436950 100644 --- a/tools/dump_hirfile/main.cpp +++ b/tools/dump_hirfile/main.cpp @@ -148,7 +148,7 @@ void Dumper::dump_crate(const char* name, const ::HIR::Crate& crate) const } void Dumper::dump_module(::HIR::ItemPath ip, const ::HIR::Publicity& pub, const ::HIR::Module& mod) const { - if( !filters.public_only && !pub.is_global() ) + if( filters.public_only && !pub.is_global() ) { return ; } @@ -216,7 +216,7 @@ void Dumper::dump_function(::HIR::ItemPath ip, const ::HIR::Publicity& pub, cons if( !this->filters.types.functions ) { return ; } - if( !filters.public_only && !pub.is_global() ) { + if( filters.public_only && !pub.is_global() ) { return ; } ::std::cout << indent << "fn " << ip << fcn.m_params.fmt_args() << "("; -- cgit v1.2.3