aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/LLParser.h
Commit message (Collapse)AuthorAgeFilesLines
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-271-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114847 91177308-0d34-0410-b5e6-96231b3b80d8
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-281-3/+0
| | | | | | | being actively maintained, improved, or extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment explaining why this code is more complex than itDan Gohman2010-08-241-0/+8
| | | | | | | initially seems it should require. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111913 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend function-local metadata to be usable as attachments.Dan Gohman2010-08-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111895 91177308-0d34-0410-b5e6-96231b3b80d8
* Give ParseInstructionMetadata access to the PerFunctionState object.Dan Gohman2010-08-241-1/+1
| | | | | | | | This is in preparation for generalizing its parsing of function-local values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111893 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out metadata parsing into a separate function.Dan Gohman2010-07-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108343 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a crash on invalid metadata, e.g.: call i32 @foo(), XXXXChris Lattner2010-04-071-1/+1
| | | | | | | | | | We would return the error without inserting the new instruction into the program, so it wouldn't get deallocated, and an abort would trigger when the module was deleted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100602 91177308-0d34-0410-b5e6-96231b3b80d8
* include header.Chris Lattner2010-04-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100087 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite handling of forward ref'd instruction metadata Chris Lattner2010-04-011-0/+9
| | | | | | | | | to used deferred resolution instead of creating a temporary node + rauw. There is no reason to create the temporary mdnode, then do rauw, then destroy it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100086 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a temporary smallvectorChris Lattner2010-04-011-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100082 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner2010-02-121-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96011 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function attribute, 'alignstack'. It will indicate (when the backendsCharles Davis2010-02-121-0/+1
| | | | | | | | implement support for it) that the stack should be forcibly realigned in the prologue (and the process reversed in the epilogue). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95945 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MetadataBase class because it is not adding significant value.Devang Patel2010-01-221-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94243 91177308-0d34-0410-b5e6-96231b3b80d8
* Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, ↵Victor Hernandez2010-01-111-4/+1
| | | | | | and ConvertValIDToValue into a more powerful ConvertValIDToValue() that does all three's work git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93197 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-101-4/+2
| | | | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93108 91177308-0d34-0410-b5e6-96231b3b80d8
* When parsing function-local metadata, create a function-local MDNodeVictor Hernandez2010-01-061-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92838 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-add parsing of function-local metadata; this time with testcase.Victor Hernandez2010-01-051-11/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92793 91177308-0d34-0410-b5e6-96231b3b80d8
* now that instruction metadata is only parsed in one place, eliminate theChris Lattner2009-12-301-2/+2
| | | | | | | | parser-global MDsOnInst vector and make ParseInstructionMetadata return its result by-ref through an argument like the entire rest of the parser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92302 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement ParseOptionalInfo as ParseOptionalCommaAlign, correctlyChris Lattner2009-12-301-4/+4
| | | | | | | handle the comma case for metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92301 91177308-0d34-0410-b5e6-96231b3b80d8
* rename ParseOptionalCustomMetadata -> ParseInstructionMetadata,Chris Lattner2009-12-301-1/+1
| | | | | | | | and make it non-optional. This fixes the bug where we'd accept and ignore a spurious comma after some instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92300 91177308-0d34-0410-b5e6-96231b3b80d8
* convert 4 more instructions over.Chris Lattner2009-12-301-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92299 91177308-0d34-0410-b5e6-96231b3b80d8
* add facilities to start factoring instruction metadata parsingChris Lattner2009-12-301-4/+6
| | | | | | | out of each opcode's handler. Change ret over so far. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92298 91177308-0d34-0410-b5e6-96231b3b80d8
* reimplement insertvalue/extractvalue metadata handling to not blindly Chris Lattner2009-12-301-1/+8
| | | | | | | accept invalid input. Actually add a testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92297 91177308-0d34-0410-b5e6-96231b3b80d8
* rename MetadataCache -> NumberedMetadata to follow the conventionChris Lattner2009-12-301-2/+1
| | | | | | | | used by other things. Convert it to a vector since it is a dense numbering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92293 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite ParseMDNodeVector to follow the normal patter used in the .ll parser.Chris Lattner2009-12-301-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92292 91177308-0d34-0410-b5e6-96231b3b80d8
* rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as ↵Chris Lattner2009-12-301-1/+1
| | | | | | you'd expect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92291 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the code added in r90497. It has several major issues and no tests.Chris Lattner2009-12-301-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92288 91177308-0d34-0410-b5e6-96231b3b80d8
* split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting.Chris Lattner2009-12-301-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92287 91177308-0d34-0410-b5e6-96231b3b80d8
* change ParseMDString and ParseMDNode to take arguments of the right type.Chris Lattner2009-12-291-2/+2
| | | | | | | | This exposed a raft of other problems, which I'll deal with in subsequent patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92273 91177308-0d34-0410-b5e6-96231b3b80d8
* switch to TrackingVH instead of WeakVH, since these can neverChris Lattner2009-12-291-3/+3
| | | | | | | | be RAUW'd and go to null. This also gets us some sorely lacking type safety. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92272 91177308-0d34-0410-b5e6-96231b3b80d8
* Metadata.h doesn't need to include ValueHandle.h anymore.Chris Lattner2009-12-281-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92211 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ParseInlineMetadata() which can parses metadata that refers to an ↵Victor Hernandez2009-12-031-1/+3
| | | | | | instruction. Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90497 91177308-0d34-0410-b5e6-96231b3b80d8
* Use WeakVH while storing metadata in containers.Devang Patel2009-11-051-2/+2
| | | | | | | This fixes PR5393. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86091 91177308-0d34-0410-b5e6-96231b3b80d8
* full asmparser support for blockaddress. We can now do:Chris Lattner2009-10-281-4/+51
| | | | | | | | | | | $ llvm-as foo.ll -d -disable-output which reads and prints the .ll file. BC encoding is the next project. Testcase will go in once that works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85368 91177308-0d34-0410-b5e6-96231b3b80d8
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85351 91177308-0d34-0410-b5e6-96231b3b80d8
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-271-1/+8
| | | | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85274 91177308-0d34-0410-b5e6-96231b3b80d8
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-1/+1
| | | | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84987 91177308-0d34-0410-b5e6-96231b3b80d8
* Autoupgrade malloc insts to malloc calls.Victor Hernandez2009-10-171-2/+5
| | | | | | | | | | Update testcases that rely on malloc insts being present. Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse custom metadata attached with an instruction.Devang Patel2009-09-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83033 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use global typedef for MDKindID.Devang Patel2009-09-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83016 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it ↵Victor Hernandez2009-09-251-5/+2
| | | | | | causes regressions in the nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82784 91177308-0d34-0410-b5e6-96231b3b80d8
* Auto-upgrade malloc instructions to malloc calls.Victor Hernandez2009-09-241-2/+5
| | | | | | | | Reviewed by Devang Patel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix parsing of optional metadata for 'load', 'store' and 'alloc' instructions.Devang Patel2009-09-171-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82175 91177308-0d34-0410-b5e6-96231b3b80d8
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the AsmWriter to print unnamed numbered types as "%0 = type ..."Dan Gohman2009-08-121-0/+1
| | | | | | | | and unnamed numbered global variables as "@0 = global ...". Extend the AsmParser to recognize these forms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78859 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse named metadata.Devang Patel2009-07-291-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77410 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into ↵Devang Patel2009-07-231-3/+3
| | | | | | METADATA_BLOCK in bitcode file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-221-1/+2
| | | | | | | | | | Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor metadata parsing routines into separate functions.Devang Patel2009-07-201-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76455 91177308-0d34-0410-b5e6-96231b3b80d8
* Support MDNode forward reference.Devang Patel2009-07-081-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75031 91177308-0d34-0410-b5e6-96231b3b80d8