fixes 'noreturn' regression for Visual C++
This commit is contained in:
parent
9d03d166a8
commit
706080dcbd
1 changed files with 2 additions and 0 deletions
|
|
@ -721,6 +721,8 @@ proc genProcPrototype(m: BModule, sym: PSym) =
|
||||||
getTypeDesc(m, sym.loc.t), mangleDynLibProc(sym)))
|
getTypeDesc(m, sym.loc.t), mangleDynLibProc(sym)))
|
||||||
elif not containsOrIncl(m.declaredProtos, sym.id):
|
elif not containsOrIncl(m.declaredProtos, sym.id):
|
||||||
var header = genProcHeader(m, sym)
|
var header = genProcHeader(m, sym)
|
||||||
|
if sfNoReturn in sym.flags and hasDeclspec in extccomp.CC[cCompiler].props:
|
||||||
|
header = "__declspec(noreturn) " & header
|
||||||
if sym.typ.callConv != ccInline and crossesCppBoundary(m, sym):
|
if sym.typ.callConv != ccInline and crossesCppBoundary(m, sym):
|
||||||
header = "extern \"C\" " & header
|
header = "extern \"C\" " & header
|
||||||
if sfPure in sym.flags and hasAttribute in CC[cCompiler].props:
|
if sfPure in sym.flags and hasAttribute in CC[cCompiler].props:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue