llvm-project/llvm/lib
Alex Lorenz 1de2acd3c2 AsmParser: Save and restore the parsing state for types using SlotMapping.
This commit extends the 'SlotMapping' structure 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 commit also introduces a new method called
'restoreParsingState' to LLParser, which uses the slot mappings to restore
some of its internal parsing state.

This commit is required to serialize constant value pointers in the machine
memory operands for the MIR format.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 245740
2015-08-21 21:32:39 +00:00
..
Analysis [LVI] Use a SmallVector instead of SmallPtrSet. NFC 2015-08-21 21:18:26 +00:00
AsmParser AsmParser: Save and restore the parsing state for types using SlotMapping. 2015-08-21 21:32:39 +00:00
Bitcode [IR] Give catchret an optional 'return value' operand 2015-08-15 02:46:08 +00:00
CodeGen MIR Serialization: Print MCSymbol operands. 2015-08-21 21:12:44 +00:00
DebugInfo Fix some comment typos. 2015-08-08 18:27:36 +00:00
ExecutionEngine [RuntimeDyld] Make sure code-sections aren't under-aligned. 2015-08-14 06:26:42 +00:00
Fuzzer Fix missing space in libfuzzer's help text. 2015-08-12 20:00:10 +00:00
IR Add comment as follow up to r245712 2015-08-21 20:18:39 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LTO LTO: Simplify ownership of LTOCodeGenerator::TargetMach. 2015-08-21 04:45:57 +00:00
LibDriver There is only one saver of strings. 2015-08-13 01:07:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Linker: Remove empty destructor. 2015-08-21 04:51:24 +00:00
MC Fix symbol value computation when part of the expression is weak. 2015-08-20 16:18:30 +00:00
Object Convert getSymbolSection to return an ErrorOr. 2015-08-07 23:27:14 +00:00
Option Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier. 2015-07-29 17:34:41 +00:00
Passes [PM/AA] Remove the last relics of the separate IPA library from LLVM, 2015-08-18 17:51:53 +00:00
ProfileData Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Support [APFloat] Remove else after return and replace loop with std::equal. NFC. 2015-08-21 16:44:52 +00:00
TableGen TableGen: Support folding casts from bits to int 2015-07-31 01:12:06 +00:00
Target [x86] enable machine combiner reassociations for 256-bit vector min/max 2015-08-21 21:04:21 +00:00
Transforms [opaque pointer type]: Pass explicit pointee type when building a constant GEP. 2015-08-21 20:16:51 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00