summary refs log tree commit diff stats
path: root/compiler/cgen.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2016-11-05 01:19:23 +0100
committerAraq <rumpf_a@web.de>2016-11-05 01:19:23 +0100
commit9e6fb3f696b2d28f900506b531a916457b4a263c (patch)
treebfa56e480c01264102b26703181c1c8a6d8e2233 /compiler/cgen.nim
parent33ebf3e5fb05f45abadeff4747ab0e3031f75dd0 (diff)
downloadNim-9e6fb3f696b2d28f900506b531a916457b4a263c.tar.gz
new dependency tracking for nimsuggest
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r--compiler/cgen.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index 86b0d60d0..6e18c8389 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -16,6 +16,8 @@ import
   condsyms, rodutils, renderer, idgen, cgendata, ccgmerge, semfold, aliases,
   lowerings, semparallel
 
+from modulegraphs import ModuleGraph
+
 import strutils except `%` # collides with ropes.`%`
 
 when options.hasTinyCBackend:
@@ -1174,7 +1176,7 @@ proc newModule(module: PSym): BModule =
     if (sfDeadCodeElim in module.flags):
       internalError("added pending module twice: " & module.filename)
 
-proc myOpen(module: PSym; cache: IdentCache): PPassContext =
+proc myOpen(graph: ModuleGraph; module: PSym; cache: IdentCache): PPassContext =
   result = newModule(module)
   if optGenIndex in gGlobalOptions and generatedHeader == nil:
     let f = if headerFile.len > 0: headerFile else: gProjectFull
@@ -1209,7 +1211,7 @@ proc getCFile(m: BModule): string =
       else: ".c"
   result = changeFileExt(completeCFilePath(m.cfilename.withPackageName), ext)
 
-proc myOpenCached(module: PSym, rd: PRodReader): PPassContext =
+proc myOpenCached(graph: ModuleGraph; module: PSym, rd: PRodReader): PPassContext =
   assert optSymbolFiles in gGlobalOptions
   var m = newModule(module)
   readMergeInfo(getCFile(m), m)