[PATCH] D105938: [AsmParser] Unify parsing of attributes
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 13 14:02:33 PDT 2021
nikic created this revision.
nikic added a reviewer: opaque-pointers.
Herald added a subscriber: hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Continuing on from D105780 <https://reviews.llvm.org/D105780>, this should be the last major bit of attribute cleanup. Currently, LLParser implements attribute parsing for functions, parameters and returns separately, enumerating all supported (and unsupported) attributes each time. This patch extracts the common parsing logic, and performs a check afterwards whether the attribute is valid in the given position. Parameters and returns are handled together, while function attributes need slightly different logic to support attribute groups.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105938
Files:
llvm/include/llvm/AsmParser/LLParser.h
llvm/lib/AsmParser/LLParser.cpp
llvm/test/Assembler/byref-parse-error-10.ll
llvm/test/Assembler/byref-parse-error-5.ll
llvm/test/Assembler/byref-parse-error-6.ll
llvm/test/Assembler/byref-parse-error-7.ll
llvm/test/Assembler/byref-parse-error-8.ll
llvm/test/Assembler/byref-parse-error-9.ll
llvm/test/Assembler/invalid-immarg2.ll
llvm/test/Assembler/invalid-immarg3.ll
llvm/test/Assembler/invalid-safestack-param.ll
llvm/test/Assembler/invalid-safestack-return.ll
llvm/test/Assembler/mustprogress-parse-error-0.ll
llvm/test/Assembler/mustprogress-parse-error-1.ll
llvm/test/Transforms/LoopDeletion/assume.ll
llvm/test/Verifier/swifterror2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105938.358421.patch
Type: text/x-patch
Size: 29361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210713/6d80cdd7/attachment.bin>
More information about the llvm-commits
mailing list