aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/module.cc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-12-09 12:18:06 -0800
committerNathan Sidwell <nathan@acm.org>2020-12-10 05:21:52 -0800
commit8c60696b699e0b22cc12ae628473f0a23f90c82e (patch)
tree3f67ba38dcace1dc882fc9768a287feab2399847 /gcc/cp/module.cc
parent79c1b9fb44ce9abd0e2f6642b65684b9721233ee (diff)
downloadgcc-8c60696b699e0b22cc12ae628473f0a23f90c82e.zip
gcc-8c60696b699e0b22cc12ae628473f0a23f90c82e.tar.gz
gcc-8c60696b699e0b22cc12ae628473f0a23f90c82e.tar.bz2
c++: Module-specific error and tree dumping
With modules, we need the ability to name 'foos' in different modules. The idiom for that is a trailing '@modulename' suffix. This adds that to the error printing routines. I also augment the tree dumping machinery to show module-specific metadata. gcc/cp/ * error.c (dump_module_suffix): New. (dump_aggr_type, dump_simple_decl, dump_function_name): Call it. * ptree.c (cxx_print_decl): Print module information. * module.cc (module_name, get_importing_module): Stubs.
Diffstat (limited to 'gcc/cp/module.cc')
-rw-r--r--gcc/cp/module.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index 3587dfc..176286c 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -74,6 +74,11 @@ get_module (tree, module_state *, bool)
return nullptr;
}
+const char *
+module_name (unsigned, bool)
+{
+ return nullptr;
+}
void
mangle_module (int, bool)
@@ -102,6 +107,12 @@ get_originating_module (tree, bool)
return 0;
}
+unsigned
+get_importing_module (tree, bool)
+{
+ return 0;
+}
+
bool
module_may_redeclare (tree)
{