[PATCH] [clang] add support for -W{no-,}inline-asm-syntax

David Woodhouse dwmw2 at infradead.org
Thu Feb 20 03:14:11 PST 2014


On Thu, 2014-02-20 at 02:02 -0800, Chandler Carruth wrote:
> 
> This really doesn't make sense. So, we've not disabled the inline
> assembler, so we will eventually produce an error, but we don't ask it to
> validate the assembly about to be fed to itself (and errored on) while we
> have the full context of the source code to go with it? How is this
> reasonable behavior?
> 
> Very fundamentally, LLVM's integrated assembler *is* going to assemble the
> program.

No. It isn't.

Absolutely *nothing* is going to assemble this program.

We invoke the compiler with the '-S' option. It's going to *compile* the
program, and spit out a .s file for us.

Hence my comparison with a pre-processor. It makes as much sense for the
compiler in this case to be prodding and poking at the contents of
asm("") statements, as it does for a C preprocessor to barf because
"that's not valid C" when we use it for X keymap files.

-- 
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140220/af1cdee0/attachment.bin>


More information about the llvm-commits mailing list