aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-04-21 07:03:22 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-04-21 07:03:22 +0000
commitf452f0d67f1a5a0da4e1e15026c5a9c322c2f5b7 (patch)
tree9d1ebf2d51a3d592f3da1e990227110b34824acb /gcc/d
parent7bbcf395754a39d1125003bf49432fbd54a5401d (diff)
downloadgcc-f452f0d67f1a5a0da4e1e15026c5a9c322c2f5b7.zip
gcc-f452f0d67f1a5a0da4e1e15026c5a9c322c2f5b7.tar.gz
gcc-f452f0d67f1a5a0da4e1e15026c5a9c322c2f5b7.tar.bz2
d: Ensure all unittests are registered against the original module.
As any unittest functions registered against the testing module when compiling with -fbuilding-libphobos-tests are ignored during the generation of the ModuleInfo data. gcc/d/ChangeLog: 2019-04-21 Iain Buclaw <ibuclaw@gdcproject.org> * modules.cc (register_module_decl): Don't register unittests against the ModuleInfo symbol for -fbuilding-libphobos-tests. From-SVN: r270477
Diffstat (limited to 'gcc/d')
-rw-r--r--gcc/d/ChangeLog5
-rw-r--r--gcc/d/modules.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog
index 5a622af..48fc9c6 100644
--- a/gcc/d/ChangeLog
+++ b/gcc/d/ChangeLog
@@ -1,3 +1,8 @@
+2019-04-21 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * modules.cc (register_module_decl): Don't register unittests against
+ the ModuleInfo symbol for -fbuilding-libphobos-tests.
+
2019-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
* d-system.h (POSIX): Define unix as POSIX.
diff --git a/gcc/d/modules.cc b/gcc/d/modules.cc
index 315f5d8..35050c8 100644
--- a/gcc/d/modules.cc
+++ b/gcc/d/modules.cc
@@ -836,7 +836,8 @@ register_module_decl (Declaration *d)
compiling in unittests are kept track of separately so they are
not omitted when compiling with -fbuilding-libphobos-tests. */
module_info *minfo;
- if (flag_building_libphobos_tests && DECL_IN_UNITTEST_CONDITION_P (decl))
+ if (flag_building_libphobos_tests && !fd->isUnitTestDeclaration ()
+ && DECL_IN_UNITTEST_CONDITION_P (decl))
minfo = current_testing_module;
else
minfo = current_moduleinfo;