[cfe-commits] r107953 - /cfe/trunk/lib/Basic/Targets.cpp
eli.friedman at gmail.com
Fri Jul 9 15:27:36 PDT 2010
On Fri, Jul 9, 2010 at 2:55 PM, John Thompson
<john.thompson.jtsoftware at gmail.com> wrote:
> Looking at it in the debugger, validateOutputConstraint and
> validateInputConstraint are also called earlier from Sema::ActOnAsmStmt
> after parsing. It seems you are implying that the string literals should be
> modified at some point before the validate and other functions are called
> that use the strings.
To be completely correct, Sema actually needs to validate that each
possible alternative is individually valid; so ideally Sema should be
splitting the constraints on commas, and passing the split constraints
into validateInputConstraint and validateOutputConstraint.
That said, your patch to simply return early from
validateInputConstraint and validateOutputConstraint seems good enough
as a hack. I think you'll still need some IRGen changes to actually
get usable IR, though; if the extra commas get into the IR, they'll
likely confuse LLVM CodeGen.
More information about the cfe-commits