diff options
author | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 18:34:12 -0500 |
---|---|---|
committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 18:34:12 -0500 |
commit | 9340885251e7791ee5a03f2b75e168f341e231e5 (patch) | |
tree | 86b4a189f01a1c114f5bb9e48d33e09a731953b0 /compiler/ccgmerge.nim | |
parent | 4e305c304014c5ef90413d6cab562f5e2b34e573 (diff) | |
parent | b9dc486db15bb1b4b6f3cef7626733b904d377f7 (diff) | |
download | Nim-9340885251e7791ee5a03f2b75e168f341e231e5.tar.gz |
Merge remote-tracking branch 'upstream/devel' into test-7010
Diffstat (limited to 'compiler/ccgmerge.nim')
-rw-r--r-- | compiler/ccgmerge.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/ccgmerge.nim b/compiler/ccgmerge.nim index 067a60c57..144a45816 100644 --- a/compiler/ccgmerge.nim +++ b/compiler/ccgmerge.nim @@ -12,7 +12,7 @@ import ast, astalgo, ropes, options, strutils, nimlexbase, msgs, cgendata, rodutils, - intsets, platform, llstream, tables, sighashes + intsets, platform, llstream, tables, sighashes, pathutils # Careful! Section marks need to contain a tabulator so that they cannot # be part of C string literals. @@ -226,7 +226,7 @@ proc processMergeInfo(L: var TBaseLexer, m: BModule) = when not defined(nimhygiene): {.pragma: inject.} -template withCFile(cfilename: string, body: untyped) = +template withCFile(cfilename: AbsoluteFile, body: untyped) = var s = llStreamOpen(cfilename, fmRead) if s == nil: return var L {.inject.}: TBaseLexer @@ -238,7 +238,7 @@ template withCFile(cfilename: string, body: untyped) = body closeBaseLexer(L) -proc readMergeInfo*(cfilename: string, m: BModule) = +proc readMergeInfo*(cfilename: AbsoluteFile, m: BModule) = ## reads the merge meta information into `m`. withCFile(cfilename): readKey(L, k) @@ -251,7 +251,7 @@ type f: TCFileSections p: TCProcSections -proc readMergeSections(cfilename: string, m: var TMergeSections) = +proc readMergeSections(cfilename: AbsoluteFile, m: var TMergeSections) = ## reads the merge sections into `m`. withCFile(cfilename): readKey(L, k) @@ -285,7 +285,7 @@ proc mergeRequired*(m: BModule): bool = #echo "not empty: ", i, " ", m.initProc.s[i] return true -proc mergeFiles*(cfilename: string, m: BModule) = +proc mergeFiles*(cfilename: AbsoluteFile, m: BModule) = ## merges the C file with the old version on hard disc. var old: TMergeSections readMergeSections(cfilename, old) |