Commit f452f0d6 by Iain Buclaw Committed by Iain Buclaw

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
parent 7bbcf395
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> 2019-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
* d-system.h (POSIX): Define unix as POSIX. * d-system.h (POSIX): Define unix as POSIX.
......
...@@ -836,7 +836,8 @@ register_module_decl (Declaration *d) ...@@ -836,7 +836,8 @@ register_module_decl (Declaration *d)
compiling in unittests are kept track of separately so they are compiling in unittests are kept track of separately so they are
not omitted when compiling with -fbuilding-libphobos-tests. */ not omitted when compiling with -fbuilding-libphobos-tests. */
module_info *minfo; 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; minfo = current_testing_module;
else else
minfo = current_moduleinfo; minfo = current_moduleinfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment