aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'backendC/CleanCompilerSources/backend.c')
-rw-r--r--backendC/CleanCompilerSources/backend.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/backendC/CleanCompilerSources/backend.c b/backendC/CleanCompilerSources/backend.c
index 717e49d..360cbaa 100644
--- a/backendC/CleanCompilerSources/backend.c
+++ b/backendC/CleanCompilerSources/backend.c
@@ -402,12 +402,19 @@ BEDeclareDclModule (int moduleIndex, CleanString name, int isSystemModule, int n
char *cName;
SymbolP moduleNameSymbol;
DefMod dclModule;
+ SymbolP saveSymbols;
cName = ConvertCleanString (name);
moduleNameSymbol = ConvertAllocType (SymbolS);
moduleNameSymbol->symb_ident = Identifier (cName);
+ if (moduleIndex == main_dcl_module_n)
+ {
+ saveSymbols = gBEState.be_allSymbols;
+ gBEState.be_allSymbols = NULL;
+ }
+
DeclareModule (moduleIndex, cName, isSystemModule, nFunctions, nTypes, nConstructors, nFields);
dclModule = ConvertAllocType (DefRepr);
@@ -417,6 +424,8 @@ BEDeclareDclModule (int moduleIndex, CleanString name, int isSystemModule, int n
if (moduleIndex != main_dcl_module_n)
AddOpenDefinitionModule (moduleNameSymbol, dclModule);
+ else
+ gBEState.be_allSymbols = saveSymbols;
} /* BEDeclareDclModule */
void