diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2019-09-06 03:54:44 -0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-06 12:54:44 +0200 |
commit | 32769c478bb15bb7b290992a85dbea702dbc1f95 (patch) | |
tree | 99174185f1254828da0a385ae958b189b428b4a6 /compiler/cgen.nim | |
parent | 83975543154f03b7803c1cb86a27e9c99e445b50 (diff) | |
download | Nim-32769c478bb15bb7b290992a85dbea702dbc1f95.tar.gz |
exportc now mangles same as importc, fixes #10578 (#12144)
* fixes #10578 * add tests * add changelog * add {.exportcpp.}
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r-- | compiler/cgen.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 6e79b2d7b..ba240a020 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -1039,7 +1039,8 @@ proc requiresExternC(m: BModule; sym: PSym): bool {.inline.} = result = (sfCompileToCpp in m.module.flags and sfCompileToCpp notin sym.getModule().flags and m.config.cmd != cmdCompileToCpp) or ( - sym.flags * {sfImportc, sfInfixCall, sfCompilerProc} == {sfImportc} and + sym.flags * {sfInfixCall, sfCompilerProc, sfMangleCpp} == {} and + sym.flags * {sfImportc, sfExportc} != {} and sym.magic == mNone and m.config.cmd == cmdCompileToCpp) |