summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix two classes of bugs. First:Chris Lattner2009-03-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | validate an invariant so that the asmparser rejects a bad construct instead of the verifier. Before: llvm-as: assembly parsed, but does not verify as correct! Invalid struct return type! i64 (%struct.Type*, %struct.Type*)* @foo after: llvm-as: t.ll:5:8: functions with 'sret' argument must return void define i64 @foo(%struct.Type* noalias nocapture sret %agg.result, %struct.Type* nocapture byval %t) nounwind { ^ Second, check that void is only used where allowed (in function return types) not in arbitrary places, fixing PR3747 - Crash in llvm-as with void field in struct. We now reject that example with: $ llvm-as t.ll llvm-as: t.ll:1:12: struct element can not have void type %x = type {void} ^ llvm-svn: 66394
* Reject PR3281:accepted03.ll with:Chris Lattner2009-01-051-1/+1
| | | | | | | | llvm-as: accepted03.ll:1:35: invalid unresolved type up reference declare void @r({ \7, opaque, \10 } %su) ^ llvm-svn: 61725
* Fix PR3281:crash08.ll with this diagnostic:Chris Lattner2009-01-051-1/+2
| | | | | | | | llvm-as: crash08.ll:3:15: invalid operand type for instruction "qp" = sdiv fp128 0x1, %30 ^ llvm-svn: 61684
* reject PR3281:crash07.ll with:Chris Lattner2009-01-051-1/+1
| | | | | | | llvm-as: crash07.ll:2:32: va_arg requires operand with first class type %y = va_arg [52 x <{}>] %43, double (...) sspreq ^ llvm-svn: 61683
* Refactor some parser interfaces to fix PR3278 and a FIXME:Chris Lattner2009-01-041-2/+2
| | | | | | | ParseAssemblyString with a specified module would not parse into the module, it would create and return a new one. llvm-svn: 61635
* Down with trailing whitespace!Misha Brukman2009-01-021-30/+30
| | | | llvm-svn: 61594
* minor cleanups and comment improvements.Chris Lattner2009-01-021-3/+9
| | | | llvm-svn: 61564
* Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner2009-01-021-0/+266
and clean recursive descent parser. This change has a couple of ramifications: 1. The parser code is about 400 lines shorter (in what we maintain, not including what is autogenerated). 2. The code should be significantly faster than the old code because we don't have to work around bison's poor handling of datatypes with ctors/dtors. This also makes the code much more resistant to memory leaks. 3. We now get caret diagnostics from the .ll parser, woo. 4. The actual diagnostics emited from the parser are completely different so a bunch of testcases had to be updated. 5. I now disallow "%ty = type opaque %ty = type i32". There was no good reason to support this, it was just an accident of the old implementation. I have no reason to think that anyone is actually using this. 6. The syntax for sticking a global variable has changed to make it unambiguous. I don't think anyone is depending on this since only clang supports this and it is not solid yet, so I'm not worried about anything breaking. 7. This gets rid of the last use of bison, and along with it the .cvs files. I'll prune this from the makefiles as a subsequent commit. There are a few minor cleanups that can be done after this commit (suggestions welcome!) but this passes dejagnu testing and is ready for its time in the limelight. llvm-svn: 61558
OpenPOWER on IntegriCloud