[PATCH 1/3] Add missing case statements to LLParser for improved error messages
Stephen Lin
swlin at post.harvard.edu
Mon Apr 8 11:24:18 PDT 2013
Hi,
I noticed a couple of missing case statements in
"lib/AsmParser/LLParser.cpp" for checking parameter attributes; also,
an error case was in the wrong category for checking return attribute.
This seemed partly due to the fact that cases were organized into two
columns, but sorted alphabetically in column-major order, which is
difficult to modify. I've reorganized the case statements into
row-major order, to make this easier to maintain in the future.
Affected cases tare the following:
--------
* Using sspstrong as a parameter attribute:
code:
define i32 @f(i32 sspstrong %g) {
ret i32 0
}
error before:
1:19: error: expected ')' at end of argument list
error after:
1:19: error: invalid use of function-only attribute
* Using noduplicate as a parameter attribute:
code:
define i32 @f(i32 noduplicate %g) {
ret i32 0
}
error before:
1:19: error: expected ')' at end of argument list
error after:
1:19: error: invalid use of function-only attribute
* Using align as a parameter attribute:
code:
define align 4 i32 @f(i32 %g) {
ret i32 0
}
error before:
1:8: error: invalid use of function-only attribute
error after:
1:8: error: invalid use of parameter-only attribute
--------
I don't have commit access so if anyone could review and commit on my
behalf, I would appreciate it.
Thanks,
Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llparser-fixup.patch
Type: application/octet-stream
Size: 4411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130408/0b6f59f3/attachment.obj>
More information about the llvm-commits
mailing list