aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfoImpls.cpp
diff options
context:
space:
mode:
authorMogball <jeffniu22@gmail.com>2022-05-16 20:28:17 +0000
committerMogball <jeffniu22@gmail.com>2022-05-16 21:15:27 +0000
commit67f0e8eec33812fdd531f9d4776ddfe5cabec5c3 (patch)
tree8ebaf037af7bbd47d5563ba2b51142dcbe81e892 /llvm/lib/CodeGen/MachineModuleInfoImpls.cpp
parenta6cef03f66ca76169ba629d21f1245b50b646ee0 (diff)
downloadllvm-67f0e8eec33812fdd531f9d4776ddfe5cabec5c3.zip
llvm-67f0e8eec33812fdd531f9d4776ddfe5cabec5c3.tar.gz
llvm-67f0e8eec33812fdd531f9d4776ddfe5cabec5c3.tar.bz2
[mlir][ods] Fix verification of attribute + colon type ambiguity
An attribute without a type builder followed by a colon in an assembly format is potentially ambiguous because the parser will read ahead to parse the colon-type and pass this as the type argument to the attribute's constructor. However, the previous verifier that checks for this ambiguity erroneously produces an error in the case of ``` let assemblyFormat = "( `(` $attr `)` )? `:`"; ``` This patch fixes the bug by implementing a checker that correctly handles all edge cases, including very strange assembly formats like: ``` let assemblyFormat = "( `(` $attr ) : (`>`)? attr-dict (`>` $a^) : (`<`)? `:`"; ``` Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125445
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfoImpls.cpp')
0 files changed, 0 insertions, 0 deletions