diff options
author | Araq <rumpf_a@web.de> | 2018-12-21 22:03:13 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-21 22:03:41 +0100 |
commit | 237085db5d7ff29a2d0e18937f08f1769c38433a (patch) | |
tree | 36fc4a1a4557033eda7c9bd48bf0e68abcc9d8e1 | |
parent | 4a6d699bc5651e834622ea8653d6a1a03ac75bd2 (diff) | |
download | Nim-237085db5d7ff29a2d0e18937f08f1769c38433a.tar.gz |
C++ tests: make DLL test green
-rw-r--r-- | compiler/ccgtypes.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index ed4aa8001..235bd16d8 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -542,7 +542,13 @@ proc getRecordDesc(m: BModule, typ: PType, name: Rope, # proper request to generate popCurrentExceptionEx not possible for 2 reasons: # generated function will be below declared Exception type and circular dependency # between Exception and popCurrentExceptionEx function - result = genProcHeader(m, magicsys.getCompilerProc(m.g.graph, "popCurrentExceptionEx")) & ";" & result + + let popExSym = magicsys.getCompilerProc(m.g.graph, "popCurrentExceptionEx") + if lfDynamicLib in popExSym.loc.flags and sfImportc in popExSym.flags: + # echo popExSym.flags, " ma flags ", popExSym.loc.flags + result = "extern " & getTypeDescAux(m, popExSym.typ, check) & " " & mangleName(m, popExSym) & ";\L" & result + else: + result = genProcHeader(m, popExSym) & ";\L" & result hasField = true else: appcg(m, result, " {$n $1 Sup;$n", |