summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/AsmParser/AsmParserTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini2016-04-141-7/+7
| | | | | | | | | | | At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
* [AsmParser] Expose an API to parse a string starting with a type.Quentin Colombet2016-03-081-0/+143
| | | | | | | | | | | | Without actually parsing a type it is difficult to perdict where the type definition ends. In other words, instead of expecting the user of the parser API to hand over only the relevant bits of the string being parsed, take the whole string, parse the type, and get back the number of characters that have been read. This will be used by the MIR testing infrastructure. llvm-svn: 262884
* [AsmParser] Add a function to parse a standalone type.Quentin Colombet2016-03-071-0/+120
| | | | | | | This is useful for MIR serialization. Indeed generic machine instructions must have a type and we don't want to duplicate the logic in the MIParser. llvm-svn: 262868
* Fix PR 24633 - Handle undef values when parsing standalone constants.Alex Lorenz2015-09-091-0/+4
| | | | llvm-svn: 247145
* AsmParser: Save and restore the parsing state for types using SlotMapping.Alex Lorenz2015-08-211-0/+36
| | | | | | | | | | | | | | | | | | | | | 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
* AsmParser: Add a function to parse a standalone constant value.Alex Lorenz2015-07-171-0/+48
| | | | | | | | | | | | | | This commit extends the interface provided by the AsmParser library by adding a function that allows the user to parse a standalone contant value. This change is useful for MIR serialization, as it will allow the MIR Parser to parse the constant values in a machine constant pool. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10280 llvm-svn: 242579
* AsmParser: Extend the API to make the global value and metadata node slot ↵Alex Lorenz2015-06-231-0/+20
| | | | | | | | | | | | | | | | | | mappings publicly accessible. This commit creates a new structure called 'SlotMapping' in the AsmParser library. This structure can be passed into the public parsing APIs from the AsmParser library in order to extract the data structures that map from slot numbers to unnamed global values and metadata nodes. This change is useful for MIR Serialization, as the MIR Parser has to lookup the unnamed global values and metadata nodes by their slot numbers. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10551 llvm-svn: 240427
* AsmParser: Require a terminating null character when creating memory buffer.Alex Lorenz2015-05-201-0/+47
This commit modifies the memory buffer creation in the AsmParser library so that it requires a terminating null character. The LLLexer in the AsmParser library checks for EOF only when it sees a null character, thus it would be best to require it when creating a memory buffer so that the memory buffer constructor can verify that a terminating null character is indeed present. Reviewers: Duncan P. N. Exon Smith, Matthias Braun Differential Revision: http://reviews.llvm.org/D9883 llvm-svn: 237833
OpenPOWER on IntegriCloud