summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* AsmWriter/Bitcode: MDGlobalVariableDuncan P. N. Exon Smith2015-02-131-1/+25
| | | | llvm-svn: 229020
* AsmWriter/Bitcode: MDTemplate{Type,Value}ParameterDuncan P. N. Exon Smith2015-02-131-2/+31
| | | | llvm-svn: 229019
* AsmWriter/Bitcode: MDNamespaceDuncan P. N. Exon Smith2015-02-131-1/+14
| | | | llvm-svn: 229018
* AsmWriter/Bitcode: MDLexicalBlockFileDuncan P. N. Exon Smith2015-02-131-1/+13
| | | | llvm-svn: 229017
* AsmWriter/Bitcode: MDLexicalBlockDuncan P. N. Exon Smith2015-02-131-1/+14
| | | | llvm-svn: 229016
* AsmWriter: MDSubprogram: Recognize DW_VIRTUALITY in 'virtuality'Duncan P. N. Exon Smith2015-02-131-2/+25
| | | | llvm-svn: 229015
* AsmWriter/Bitcode: MDSubprogramDuncan P. N. Exon Smith2015-02-131-4/+60
| | | | llvm-svn: 229014
* AsmWriter/Bitcode: MDCompileUnitDuncan P. N. Exon Smith2015-02-131-1/+31
| | | | llvm-svn: 229013
* AsmWriter/Bitcode: MDSubroutineTypeDuncan P. N. Exon Smith2015-02-131-1/+8
| | | | llvm-svn: 229011
* AsmWriter: MDCompositeType: Recognize DW_LANG in 'runtimeLang'Duncan P. N. Exon Smith2015-02-131-1/+41
| | | | llvm-svn: 229010
* AsmWriter/Bitcode: MDDerivedType and MDCompositeTypeDuncan P. N. Exon Smith2015-02-131-2/+51
| | | | llvm-svn: 229009
* AsmWriter/Bitcode: MDFileDuncan P. N. Exon Smith2015-02-131-1/+12
| | | | llvm-svn: 229007
* AsmWriter: MDBasicType: Recognize DW_ATE in 'encoding'Duncan P. N. Exon Smith2015-02-131-1/+23
| | | | llvm-svn: 229006
* AsmWriter/Bitcode: MDBasicTypeDuncan P. N. Exon Smith2015-02-131-1/+15
| | | | llvm-svn: 229005
* AsmWriter/Bitcode: MDEnumeratorDuncan P. N. Exon Smith2015-02-131-1/+11
| | | | llvm-svn: 229004
* AsmWriter/Bitcode: MDSubrangeDuncan P. N. Exon Smith2015-02-131-1/+43
| | | | llvm-svn: 229003
* AsmParser: Validate alloca's typeDavid Majnemer2015-02-111-0/+3
| | | | | | An alloca's type should be weird things like metadata. llvm-svn: 228820
* AsmParser: Don't crash when insertvalue has bad operandsDavid Majnemer2015-02-111-1/+6
| | | | llvm-svn: 228813
* AsmParser: Switch some vectors to mapsDavid Majnemer2015-02-111-19/+10
| | | | | | This speeds up parsing .ll files with metadata nodes with large IDs. llvm-svn: 228812
* AsmParser: Add stubs for specialized MDNodes, NFCDuncan P. N. Exon Smith2015-02-101-5/+61
| | | | | | Well, the exact error from the failed parse will change, but... llvm-svn: 228644
* IR: Allow 32-bits for lines in debug locationDuncan P. N. Exon Smith2015-02-061-1/+1
| | | | | | | | | | | | Remove unnecessary restriction of 24-bits for line numbers in `MDLocation`. The rest of the debug info schema (with the exception of local variables) uses 32-bits for line numbers. As I introduce the specialized nodes, it makes sense to canonicalize on one size or the other. llvm-svn: 228455
* AsmParser: Use DW_TAG_hi_user instead of magic constant, NFCDuncan P. N. Exon Smith2015-02-061-1/+1
| | | | llvm-svn: 228448
* AsmParser: Split out LineField, NFCDuncan P. N. Exon Smith2015-02-041-2/+17
| | | | | | | Split out `LineField`, which restricts the legal line numbers. This will make it easier to be consistent between different node parsers. llvm-svn: 228226
* Fix GCC error caused by r228211Duncan P. N. Exon Smith2015-02-041-0/+4
| | | | llvm-svn: 228213
* AsmParser: Move MDField details to source file, NFCDuncan P. N. Exon Smith2015-02-041-0/+42
| | | | | | | | Move all the types of `MDField` to an anonymous namespace in the source file. This also eliminates the duplication of `ParseMDField()` declarations in the header for each new field type. llvm-svn: 228211
* AsmParser: Simplify assertion, NFCDuncan P. N. Exon Smith2015-02-041-1/+1
| | | | llvm-svn: 228209
* AsmParser: Remove dead code, NFCDuncan P. N. Exon Smith2015-02-041-4/+0
| | | | | | This condition is checked in the generic `ParseMDField()`. llvm-svn: 228208
* AsmParser: Simplify MDUnsignedFieldDuncan P. N. Exon Smith2015-02-041-8/+8
| | | | | | We only need `uint64_t` for storage. llvm-svn: 228205
* AsmParser: Recognize DW_TAG_* constantsDuncan P. N. Exon Smith2015-02-031-1/+24
| | | | | | | Recognize `DW_TAG_` constants in assembly, and output it by default for `GenericDebugNode`. llvm-svn: 228042
* IR: Assembly and bitcode for GenericDebugNodeDuncan P. N. Exon Smith2015-02-031-0/+36
| | | | llvm-svn: 228041
* IR: Split out DebugInfoMetadata.h, NFCDuncan P. N. Exon Smith2015-02-021-0/+1
| | | | | | | | | Move debug-info-centred `Metadata` subclasses into their own header/source file. A couple of private template functions are needed from both `Metadata.cpp` and `DebugInfoMetadata.cpp`, so I've moved them to `lib/IR/MetadataImpl.h`. llvm-svn: 227835
* AsmParser: PARSE_MD_FIELD() => ParseMDField(), NFCDuncan P. N. Exon Smith2015-01-201-13/+12
| | | | | | Extract most of `PARSE_MD_FIELD()` into a function. llvm-svn: 226539
* AsmParser: Refactor duplicate code, NFCDuncan P. N. Exon Smith2015-01-201-8/+4
| | | | llvm-svn: 226538
* AsmParser: Abstract more of MDLocation parser, NFCDuncan P. N. Exon Smith2015-01-191-16/+27
| | | | llvm-svn: 226527
* AsmParser: Split up ParseMDFieldsImpl(), NFCDuncan P. N. Exon Smith2015-01-191-10/+15
| | | | llvm-svn: 226526
* AsmParser: Fix error location for missing fieldsDuncan P. N. Exon Smith2015-01-191-9/+11
| | | | llvm-svn: 226524
* IR: Merge UniquableMDNode back into MDNode, NFCDuncan P. N. Exon Smith2015-01-191-2/+2
| | | | | | | | | As pointed out in r226501, the distinction between `MDNode` and `UniquableMDNode` is confusing. When we need subclasses of `MDNode` that don't use all its functionality it might make sense to break it apart again, but until then this makes the code clearer. llvm-svn: 226520
* IR: Return unique_ptr from MDNode::getTemporary()Duncan P. N. Exon Smith2015-01-191-7/+5
| | | | | | | | | | | | Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and clean up call sites. (For now, `DIBuilder` call sites just call `release()` immediately.) There's an accompanying change in each of clang and polly to use the new API. llvm-svn: 226504
* IR: Remove MDNodeFwdDeclDuncan P. N. Exon Smith2015-01-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove `MDNodeFwdDecl` (as promised in r226481). Aside from API changes, there's no real functionality change here. `MDNode::getTemporary()` now forwards to `MDTuple::getTemporary()`, which returns a tuple with `isTemporary()` equal to true. The main point is that we can now add temporaries of other `MDNode` subclasses, needed for PR22235 (I introduced `MDNodeFwdDecl` in the first place because I didn't recognize this need, and thought they were only needed to handle forward references). A few things left out of (or highlighted by) this commit: - I've had to remove the (few) uses of `std::unique_ptr<>` to deal with temporaries, since the destructor is no longer public. `getTemporary()` should probably return the equivalent of `std::unique_ptr<T, MDNode::deleteTemporary>`. - `MDLocation::getTemporary()` doesn't exist yet (worse, it actually does exist, but does the wrong thing: `MDNode::getTemporary()` is inherited and returns an `MDTuple`). - `MDNode` now only has one subclass, `UniquableMDNode`, and the distinction between them is actually somewhat confusing. I'll fix those up next. llvm-svn: 226501
* IR: Allow 16-bits for column infoDuncan P. N. Exon Smith2015-01-161-1/+1
| | | | | | Raise the limit for column information from 8 bits to 16 bits. llvm-svn: 226291
* AsmParser/Bitcode: Add support for MDLocationDuncan P. N. Exon Smith2015-01-131-2/+118
| | | | | | | | | | | | This adds assembly and bitcode support for `MDLocation`. The assembly side is rather big, since this is the first `MDNode` subclass (that isn't `MDTuple`). Part of PR21433. (If you're wondering where the mountains of testcase updates are, we don't need them until I update `DILocation` and `DebugLoc` to actually use this class.) llvm-svn: 225830
* AsmParser: Use subclass API instead of MDNode wrappers, NFCDuncan P. N. Exon Smith2015-01-121-4/+4
| | | | | | | | Use subclass API instead of the wrappers in `MDNode` in the assembly parser. This will make the code easier to follow once we have multiple subclasses. llvm-svn: 225711
* AsmParser: Factor duplicated code into ParseMDNode(), NFCDuncan P. N. Exon Smith2015-01-121-27/+22
| | | | llvm-svn: 225710
* AsmParser: Reorder ParseMetadata() logic, NFCDuncan P. N. Exon Smith2015-01-121-13/+13
| | | | llvm-svn: 225709
* AsmParser: Simplify ParseMDTuple(), NFCDuncan P. N. Exon Smith2015-01-121-4/+1
| | | | llvm-svn: 225708
* AsmParser: ParseMDNode() => ParseMDTuple(), NFCDuncan P. N. Exon Smith2015-01-121-4/+4
| | | | | | This isn't parsing arbitrary subclasses of `MDNode`, just `MDTuple`. llvm-svn: 225702
* AsmParser: Remove unused version of ParseMDNodeID()Duncan P. N. Exon Smith2015-01-121-17/+6
| | | | | | | Merge the two versions of `ParseMDNodeID()` now that no one needs special forward references. llvm-svn: 225699
* AsmParser: Use normal references for metadata attachments, NFCDuncan P. N. Exon Smith2015-01-121-38/+6
| | | | | | | | Remove special parsing logic for metadata attachments. Now that `DebugLoc` is stored normally (since the metadata/value split), we don't need this special forward referencing logic. llvm-svn: 225698
* IR: Split GenericMDNode into MDTuple and UniquableMDNodeDuncan P. N. Exon Smith2015-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Split `GenericMDNode` into two classes (with more descriptive names). - `UniquableMDNode` will be a common subclass for `MDNode`s that are sometimes uniqued like constants, and sometimes 'distinct'. This class gets the (short-lived) RAUW support and related API. - `MDTuple` is the basic tuple that has always been returned by `MDNode::get()`. This is as opposed to more specific nodes to be added soon, which have additional fields, custom assembly syntax, and extra semantics. This class gets the hash-related logic, since other sublcasses of `UniquableMDNode` may need to hash based on other fields. To keep this diff from getting too big, I've added casts to `MDTuple` that won't really scale as new subclasses of `UniquableMDNode` are added, but I'll clean those up incrementally. (No functionality change intended.) llvm-svn: 225682
* IR: Add 'distinct' MDNodes to bitcode and assemblyDuncan P. N. Exon Smith2015-01-081-3/+7
| | | | | | | | | | | | | | | | | | Propagate whether `MDNode`s are 'distinct' through the other types of IR (assembly and bitcode). This adds the `distinct` keyword to assembly. Currently, no one actually calls `MDNode::getDistinct()`, so these nodes only get created for: - self-references, which are never uniqued, and - nodes whose operands are replaced that hit a uniquing collision. The concept of distinct nodes is still not quite first-class, since distinct-ness doesn't yet survive across `MapMetadata()`. Part of PR22111. llvm-svn: 225474
OpenPOWER on IntegriCloud