diff --git a/dmd/func.c b/dmd/func.c index 6b569beb..62e7ee27 100644 --- a/dmd/func.c +++ b/dmd/func.c @@ -3277,7 +3277,11 @@ Dsymbol *UnitTestDeclaration::syntaxCopy(Dsymbol *s) void UnitTestDeclaration::semantic(Scope *sc) { +#if IN_LLVM + if (global.params.useUnitTests && sc->module->isRoot) +#else if (global.params.useUnitTests) +#endif { if (!type) type = new TypeFunction(NULL, Type::tvoid, FALSE, LINKd);