summary refs log tree commit diff stats
path: root/compiler/ndi.nim
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2018-09-14 18:34:12 -0500
committerGanesh Viswanathan <dev@genotrance.com>2018-09-14 18:34:12 -0500
commit9340885251e7791ee5a03f2b75e168f341e231e5 (patch)
tree86b4a189f01a1c114f5bb9e48d33e09a731953b0 /compiler/ndi.nim
parent4e305c304014c5ef90413d6cab562f5e2b34e573 (diff)
parentb9dc486db15bb1b4b6f3cef7626733b904d377f7 (diff)
downloadNim-9340885251e7791ee5a03f2b75e168f341e231e5.tar.gz
Merge remote-tracking branch 'upstream/devel' into test-7010
Diffstat (limited to 'compiler/ndi.nim')
-rw-r--r--compiler/ndi.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/ndi.nim b/compiler/ndi.nim
index 9708c388d..f672b1b76 100644
--- a/compiler/ndi.nim
+++ b/compiler/ndi.nim
@@ -10,7 +10,7 @@
 ## This module implements the generation of ``.ndi`` files for better debugging
 ## support of Nim code. "ndi" stands for "Nim debug info".
 
-import ast, msgs, ropes, options
+import ast, msgs, ropes, options, pathutils
 
 type
   NdiFile* = object
@@ -30,10 +30,10 @@ proc doWrite(f: var NdiFile; s: PSym; conf: ConfigRef) =
 template writeMangledName*(f: NdiFile; s: PSym; conf: ConfigRef) =
   if f.enabled: doWrite(f, s, conf)
 
-proc open*(f: var NdiFile; filename: string; conf: ConfigRef) =
-  f.enabled = filename.len > 0
+proc open*(f: var NdiFile; filename: AbsoluteFile; conf: ConfigRef) =
+  f.enabled = not filename.isEmpty
   if f.enabled:
-    f.f = open(filename, fmWrite, 8000)
+    f.f = open(filename.string, fmWrite, 8000)
     f.buf = newStringOfCap(20)
 
 proc close*(f: var NdiFile) =