summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/Parser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use MemoryBuffer::getBufferIdentifier() in the AsmPrinter insteadDan Gohman2009-09-081-4/+3
| | | | | | | of requiring a name be passed in. This makes it use "<stdin>" instead of "-" and makes it more consistent with the Bitcode reader. llvm-svn: 81256
* Refactor common code from ParseAssemblyString and ParseAssemblyFile,Dan Gohman2009-09-021-19/+21
| | | | | | to expose a low-level interface for parsing from an existing MemoryBuffer. llvm-svn: 80803
* switch the .ll parser to use SourceMgr.Chris Lattner2009-07-021-8/+13
| | | | llvm-svn: 74735
* switch the .ll parser into SMDiagnostic.Chris Lattner2009-07-021-38/+6
| | | | llvm-svn: 74734
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-011-2/+2
| | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. llvm-svn: 74655
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-2/+2
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-4/+5
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Fix the path to llvm/Assembly/Parser.h in a comment.Dan Gohman2009-01-081-1/+1
| | | | llvm-svn: 61948
* Refactor some parser interfaces to fix PR3278 and a FIXME:Chris Lattner2009-01-041-11/+20
| | | | | | | 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-9/+8
| | | | llvm-svn: 61594
* Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner2009-01-021-46/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Change the MemoryBuffer::getFile* methods to take just a pointer to theChris Lattner2008-04-011-2/+1
| | | | | | | | start of a filename, not a filename+length. All clients can produce a null terminated name, and the system api's require null terminated strings anyway. llvm-svn: 49041
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-0/+1
| | | | | | annoying warnings. llvm-svn: 47367
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Replace the original flex lexer with a hand writen one. This Chris Lattner2007-11-181-23/+21
| | | | | | | drops a dependency on flex and lets us make future progress more easily. Yay for 2 fewer .cvs files to make silly conflicts with. llvm-svn: 44213
* For PR797:Reid Spencer2006-08-181-22/+26
| | | | | | | | | | | | | Rid the Assembly Parser of exceptions. This is a really gross hack but it will do until the Assembly Parser is re-written as a recursive descent. The basic premise is that wherever the old "ThrowException" function was called (new name: GenerateError) we set a flag (TriggerError). Every production checks that flag and calls YYERROR if it is set. Additionally, each call to ThrowException in the grammar is replaced with GEN_ERROR which calls GenerateError and then YYERROR immediately. This prevents the remaining production from continuing after an error condition. llvm-svn: 29763
* Give the asmparser the ability to parse strings. Patch contributed byChris Lattner2005-05-201-0/+4
| | | | | | Alexander Friedman llvm-svn: 22146
* * Remove trailing whitespaceMisha Brukman2005-04-211-8/+8
| | | | | | * Convert tabs to spaces llvm-svn: 21415
* Fine-grainify namespacification, prune #includeChris Lattner2004-07-131-6/+2
| | | | llvm-svn: 14792
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* * Eliminate `using' directiveMisha Brukman2003-10-231-9/+10
| | | | | | * Order #includes as per style guide llvm-svn: 9429
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Uppercase the acronym ASCII.Misha Brukman2003-09-221-1/+1
| | | | llvm-svn: 8676
* AsmParser now depends on clients to verify that input is well formedChris Lattner2002-08-301-6/+0
| | | | llvm-svn: 3548
* MEGAPATCH checkin.Chris Lattner2002-06-251-1/+1
| | | | | | For details, See: docs/2002-06-25-MegaPatchInfo.txt llvm-svn: 2779
* Eliminate duplicate or unneccesary #include'sChris Lattner2002-04-291-1/+0
| | | | llvm-svn: 2397
* Close input file if exception is thrownChris Lattner2002-02-201-6/+10
| | | | llvm-svn: 1784
* Change to verifier interfaceChris Lattner2002-02-201-9/+3
| | | | llvm-svn: 1782
* Changes to build successfully with GCC 3.02Chris Lattner2002-01-201-1/+2
| | | | llvm-svn: 1503
* Remove exception specificationChris Lattner2001-10-131-1/+1
| | | | llvm-svn: 756
* Remove dependence on command line library. Silly anyway.Chris Lattner2001-07-221-13/+13
| | | | llvm-svn: 271
* Initial revisionChris Lattner2001-06-061-0/+84
llvm-svn: 2
OpenPOWER on IntegriCloud