fixes #8076
This commit is contained in:
parent
2dab490ec1
commit
9adfaa7f07
1 changed files with 11 additions and 10 deletions
|
|
@ -978,16 +978,17 @@ proc genAsmOrEmitStmt(p: BProc, t: PNode, isAsmStmt=false): Rope =
|
||||||
if isAsmStmt and hasGnuAsm in CC[p.config.cCompiler].props:
|
if isAsmStmt and hasGnuAsm in CC[p.config.cCompiler].props:
|
||||||
for x in splitLines(res):
|
for x in splitLines(res):
|
||||||
var j = 0
|
var j = 0
|
||||||
while x[j] in {' ', '\t'}: inc(j)
|
while j < x.len and x[j] in {' ', '\t'}: inc(j)
|
||||||
if x[j] in {'"', ':'}:
|
if j < x.len:
|
||||||
# don't modify the line if already in quotes or
|
if x[j] in {'"', ':'}:
|
||||||
# some clobber register list:
|
# don't modify the line if already in quotes or
|
||||||
add(result, x); add(result, "\L")
|
# some clobber register list:
|
||||||
elif x[j] != '\0':
|
add(result, x); add(result, "\L")
|
||||||
# ignore empty lines
|
else:
|
||||||
add(result, "\"")
|
# ignore empty lines
|
||||||
add(result, x)
|
add(result, "\"")
|
||||||
add(result, "\\n\"\n")
|
add(result, x)
|
||||||
|
add(result, "\\n\"\n")
|
||||||
else:
|
else:
|
||||||
res.add("\L")
|
res.add("\L")
|
||||||
result = res.rope
|
result = res.rope
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue