summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-10-03 01:25:47 +0200
committerAraq <rumpf_a@web.de>2018-10-03 01:25:47 +0200
commit82693514c50f674f3e09531f3145863434040b49 (patch)
tree785d5ea1d2535a25de28ae0ac9d6eac4b247e92d /compiler/pragmas.nim
parent1428aeccfb38170f4580eb3153d2e9f3d91c6756 (diff)
downloadNim-82693514c50f674f3e09531f3145863434040b49.tar.gz
attempt to fix the .line pragma
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r--compiler/pragmas.nim13
1 files changed, 1 insertions, 12 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 31c24effe..c4308fc6f 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -598,18 +598,7 @@ proc pragmaLine(c: PContext, n: PNode) =
       elif y.kind != nkIntLit:
         localError(c.config, n.info, errIntLiteralExpected)
       else:
-        if c.config.projectPath.isEmpty:
-          n.info.fileIndex = fileInfoIdx(c.config, AbsoluteFile(x.strVal))
-        else:
-          when false:
-            # XXX this is still suspicous:
-            let dir = toFullPath(c.config, n.info).splitFile.dir
-            let rel = if isAbsolute(x.strVal): relativeTo(AbsoluteFile(x.strVal), c.config.projectPath)
-                      else: RelativeFile(x.strVal)
-            n.info.fileIndex = fileInfoIdx(c.config, AbsoluteDir(dir) / rel)
-          else:
-            n.info.fileIndex = fileInfoIdx(c.config, AbsoluteFile toFullPath(c.config, n.info))
-
+        n.info.fileIndex = fileInfoIdx(c.config, AbsoluteFile(x.strVal))
         n.info.line = uint16(y.intVal)
     else:
       localError(c.config, n.info, "tuple expected")