[PATCH] disabled switching ARM modes in inline asm

David Peixotto dpeixott at codeaurora.org
Wed Dec 11 17:19:41 PST 2013


> David, thanks for the review.
> 
> > 'isParsingInlineAsm()' vs. 'getInlineAsmKind() == MAK_RAW'? The named
> > method looks more readable to me.
> 
> Oddly, the existing method isParsingInlineAsm() actually means isParsing
> MS-style Asm.  So to make it more readable, I'd change
> isParsingInlineAsm() to isParsingMsInlineAsm() and implement
> isParsingInlineAsm() as "return getInlineAsmKind() != MAK_Raw".  The
> isParsingMsInlineAsm() calls seems redundant to me, and redefining
> isParsingInlineAsm() is risky.  With the current patch, if I missed a call
> site (for example, some dependency outside the llvm repo) it would fail to
> compile, which I feel is better than silently behaving differently.

I would be slightly in favor of having both isParsingInlineAsm() (needed for
arm) and isParsingMSInlineAsm() (needed for x86), but I understand the
concern about changing the meaning of isParsingInlineAsm().

> > You changed the name of 'isParsingInlineAsm()' to 'getInlineAsmKind()'
> > in the header, but I do not see any updates to call sites for that
> > method. Is it actually used anywhere?
> 
> Yes, see X86AsmParser.cpp

Sorry, I asked about the wrong function. I meant to ask about
'setParsingInlineAsm()'. I did not see any calls to that function. Maybe
they are in clang?





More information about the llvm-commits mailing list