diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-06-04 07:24:03 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-06-04 07:24:03 +0800 |
commit | 4c695334a5e9c71bb264ff6727e213635fd64610 (patch) | |
tree | ded2da195cf614cf36c6ffc782632dcc2620b03f /tools/dump_hirfile/main.cpp | |
parent | dab72ad78160ecd2a4d1759174cee837a5bedcbc (diff) | |
download | mrust-4c695334a5e9c71bb264ff6727e213635fd64610.tar.gz |
dump_hirfile - Compile fixes for RcString change
Diffstat (limited to 'tools/dump_hirfile/main.cpp')
-rw-r--r-- | tools/dump_hirfile/main.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/dump_hirfile/main.cpp b/tools/dump_hirfile/main.cpp index 98a92f7b..c9fa09ff 100644 --- a/tools/dump_hirfile/main.cpp +++ b/tools/dump_hirfile/main.cpp @@ -38,7 +38,7 @@ int main(int argc, const char* argv[]) dumper.filters.types.functions = true; - auto hir = HIR_Deserialise(args.infile, ""); + auto hir = HIR_Deserialise(args.infile); dumper.dump_crate("", *hir); } void Dumper::dump_crate(const char* name, const ::HIR::Crate& crate) const @@ -99,7 +99,7 @@ void Dumper::dump_crate(const char* name, const ::HIR::Crate& crate) const { for(const auto& m : i.second.m_methods) { - this->dump_function(root_ip + m.first.c_str(), ::HIR::Publicity::new_global(), m.second.data, 1); + this->dump_function(root_ip + m.first, ::HIR::Publicity::new_global(), m.second.data, 1); } } ::std::cout << "}" << ::std::endl; @@ -115,7 +115,7 @@ void Dumper::dump_crate(const char* name, const ::HIR::Crate& crate) const { for(const auto& m : i.m_methods) { - this->dump_function(root_ip + m.first.c_str(), ::HIR::Publicity::new_global(), m.second.data, 1); + this->dump_function(root_ip + m.first, ::HIR::Publicity::new_global(), m.second.data, 1); } } ::std::cout << "}" << ::std::endl; @@ -129,7 +129,7 @@ void Dumper::dump_module(::HIR::ItemPath ip, const ::HIR::Publicity& pub, const } for(const auto& i : mod.m_mod_items) { - auto sub_ip = ip + i.first.c_str(); + auto sub_ip = ip + i.first; //::std::cout << "// " << i.second->ent.tagstr() << " " << sub_ip << "\n"; TU_MATCH_HDRA( (i.second->ent), {) TU_ARMA(Module, e) { @@ -160,7 +160,7 @@ void Dumper::dump_module(::HIR::ItemPath ip, const ::HIR::Publicity& pub, const } for(const auto& i : mod.m_value_items) { - auto sub_ip = ip + i.first.c_str(); + auto sub_ip = ip + i.first; //::std::cout << "// " << i.second->ent.tagstr() << " " << sub_ip << "\n"; TU_MATCH_HDRA( (i.second->ent), {) TU_ARMA(Import, e) { @@ -273,3 +273,8 @@ Args::Args(int argc, const char* const argv[]) os << ::std::dec; return os; } + +MIR::EnumCachePtr::~EnumCachePtr() +{ + assert(!this->p); +} |