This commit is contained in:
Araq 2018-06-20 10:20:42 +02:00
commit 9adfaa7f07

View file

@ -978,12 +978,13 @@ 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 j < x.len:
if x[j] in {'"', ':'}: if x[j] in {'"', ':'}:
# don't modify the line if already in quotes or # don't modify the line if already in quotes or
# some clobber register list: # some clobber register list:
add(result, x); add(result, "\L") add(result, x); add(result, "\L")
elif x[j] != '\0': else:
# ignore empty lines # ignore empty lines
add(result, "\"") add(result, "\"")
add(result, x) add(result, x)