From 948f7564700f100d24ade189d9c92f3a938cca53 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 5 May 2021 10:20:43 +0200 Subject: [PATCH] dmd.compiler: Remove unused rootHasMain global --- src/dmd/compiler.d | 3 --- src/dmd/compiler.h | 3 --- src/dmd/dsymbolsem.d | 2 -- src/dmd/frontend.h | 2 -- 4 files changed, 10 deletions(-) diff --git a/src/dmd/compiler.d b/src/dmd/compiler.d index aecacc2da54f..323aa2c5a4c1 100644 --- a/src/dmd/compiler.d +++ b/src/dmd/compiler.d @@ -37,9 +37,6 @@ version (DMDLIB) extern (C++) __gshared { - /// Module in which the D main is - Module rootHasMain = null; - bool includeImports = false; // array of module patterns used to include/exclude imported modules Array!(const(char)*) includeModulePatterns; diff --git a/src/dmd/compiler.h b/src/dmd/compiler.h index c8259edfa8bd..27e87b692a87 100644 --- a/src/dmd/compiler.h +++ b/src/dmd/compiler.h @@ -22,9 +22,6 @@ class Type; struct Scope; struct UnionExp; -// Module in which the D main is -extern Module *rootHasMain; - extern bool includeImports; // array of module patterns used to include/exclude imported modules extern Array includeModulePatterns; diff --git a/src/dmd/dsymbolsem.d b/src/dmd/dsymbolsem.d index 3ce958e09e42..5ec08bf514ac 100644 --- a/src/dmd/dsymbolsem.d +++ b/src/dmd/dsymbolsem.d @@ -4211,8 +4211,6 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor auto tm = new TemplateMixin(funcdecl.loc, null, tqual, null); sc._module.members.push(tm); } - - rootHasMain = sc._module; } assert(funcdecl.type.ty != Terror || funcdecl.errors); diff --git a/src/dmd/frontend.h b/src/dmd/frontend.h index b81e62d95899..3b86f24f1882 100644 --- a/src/dmd/frontend.h +++ b/src/dmd/frontend.h @@ -2041,8 +2041,6 @@ enum class TargetOS : uint8_t Posix = 125u, }; -extern Module* rootHasMain; - extern bool includeImports; extern Array includeModulePatterns;