[PATCH] AsmParser: Save and restore parsing state for types so that types can be parsed correctly in a separate standalone parsing stage
Alex L via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 17:14:29 PDT 2015
Hi,
This patch extends the 'SlotMapping' and includes mappings for named and
numbered types in it. The LLParser is extended accordingly to fill out those
mappings at the end of module parsing.
This information is useful when we want to parse standalone constant values
at a later stage using the 'parseConstantValue' method. The constant values
can be constant expressions, which can contain references to types. In order
to parse such constant values, we have to restore the internal named and
numbered mappings for the types in LLParser, otherwise the parser will
report
a parsing error. Therefore, this patch also introduces a new method called
'restoreParsingState' to LLParser, which uses the slot mappings to restore
some of its internal parsing state.
This patch is required to serialize constant value pointers in the machine
memory operands for the MIR format.
Cheers,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150820/012ded4e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AsmParser-Save-and-restore-the-parsing-state-of-type.patch
Type: application/octet-stream
Size: 7717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150820/012ded4e/attachment.obj>
More information about the llvm-commits
mailing list