[PATCH] Fix printing of GCCAsmExprs with input or output arguments.

Nick Sumner nick.sumner at gmail.com
Mon Jun 8 11:55:19 PDT 2015


Hi all,

The attached patch fixes a bug with printing GCCAsmExprs. Presently,
the required parentheses around input and output arguments are
omitted. Thus, given the code:

__asm__ __volatile__("addl %%ebx,%%eax" : "=a" (added) : "a" (1), "b" (2) );

The expr is presently printed as:
asm volatile ("addl %%ebx,%%eax" : "=a" added : "a" 1, "b" 2);

With the patch, the expr is printed as:
asm volatile ("addl %%ebx,%%eax" : "=a" (added) : "a" (1), "b" (2));

Best,
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: printAsmInputsOutputs.patch
Type: text/x-patch
Size: 1129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150608/3cf63ff1/attachment.bin>


More information about the cfe-commits mailing list