diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-08-07 15:40:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 15:40:39 +0800 |
commit | 26eb0a944fe6a0a5d09798262055aa30c9b0001a (patch) | |
tree | 5aa35a2c1f5dd16a7f1c6f0f123c80654afc1b51 /compiler | |
parent | e7b4c7cddbefda0790b313062c0cfd233a259d6f (diff) | |
download | Nim-26eb0a944fe6a0a5d09798262055aa30c9b0001a.tar.gz |
a bit modern code for depends (#22400)
* a bit modern code for depends * simplify
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/depends.nim | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/depends.nim b/compiler/depends.nim index 6c7ee8ffc..cb462e188 100644 --- a/compiler/depends.nim +++ b/compiler/depends.nim @@ -106,11 +106,6 @@ proc generateDot*(graph: ModuleGraph; project: AbsoluteFile) = changeFileExt(project, "dot")) proc setupDependPass*(graph: ModuleGraph; module: PSym; idgen: IdGenerator): PPassContext = - var g: PGen - new(g) - g.module = module - g.config = graph.config - g.graph = graph + result = PGen(module: module, config: graph.config, graph: graph) if graph.backend == nil: graph.backend = Backend(dotGraph: "") - result = g |