summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLLexer.h
AgeCommit message (Collapse)Author
2015-04-11Remove empty non-virtual destructors or mark them =default when non-publicBenjamin Kramer
These add no value but can make a class non-trivially copyable. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234688 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-10AsmParser: Don't crash if a null byte is inside a quoted stringDavid Majnemer
We don't allow Value* to have names which contain null bytes. The AsmParser should reject .ll files that try to do this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223869 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18These classes only need a StringRef, not a MemoryBuffer.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215945 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18Delete unused method.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215944 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-13Canonicalize header guards into a common format.Benjamin Kramer
Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215558 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-27IR: Add COMDATs to the IRDavid Majnemer
This new IR facility allows us to represent the object-file semantic of a COMDAT group. COMDATs allow us to tie together sections and make the inclusion of one dependent on another. This is required to implement features like MS ABI VFTables and optimizing away certain kinds of initialization in C++. This functionality is only representable in COFF and ELF, Mach-O has no similar mechanism. Differential Revision: http://reviews.llvm.org/D4178 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211920 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-05AsmParser: add a warning for compatibility parsingSaleem Abdulrasool
This adds a warning when linker_private or linker_private_weak is provided and we handle it in a compatible manner. Suggested by Chris Lattner! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205681 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11Revert "Give internal classes hidden visibility."Benjamin Kramer
It works with clang, but GCC has different rules so we can't make all of those hidden. This reverts commit r190534. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11Give internal classes hidden visibility.Benjamin Kramer
Worth 100k on a linux/x86_64 Release+Asserts clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190534 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06Initial submission for the attribute group feature.Bill Wendling
Attribute groups are of the form: #0 = attributes { noinline "no-sse" "cpu"="cortex-a8" alignstack=4 } Target-dependent attributes are represented as strings. Attributes can have optional values associated with them. E.g., the "cpu" attribute has the value "cortex-a8". Target-independent attributes are listed as enums inside the attribute classes. Multiple attribute groups can be referenced by the same object. In that case, the attributes are merged together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174493 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth
missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169224 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-21Removes unused field TheError from LLLexer.Manuel Klimek
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147049 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09Land the long talked about "type system rewrite" patch. ThisChris Lattner
patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04Refactor parsing of variable names (ie., %foo and @foo) since they have the sameNick Lewycky
rules. Also refactor "read string until quote" into its own function. No functionality change! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114847 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01no really, we don't need to copy strings around in the accessor.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-30rename lltok::Metadata -> lltok::exclaim. We name tokens Chris Lattner
after their syntactic form, not their semantic form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04Factor some of the constants+context related code out into a separate ↵Owen Anderson
header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Parse named metadata.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07Use LLVMContext in the LLLexer.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74934 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02switch the .ll parser to use SourceMgr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02switch the .ll parser into SMDiagnostic.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74734 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23Fix internal representation of fp80 to be theDale Johannesen
same as a normal i80 {low64, high16} rather than its own {high64, low16}. A depressing number of places know about this; I think I got them all. Bitcode readers and writers convert back to the old form to avoid breaking compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67562 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02Alphabetized #includes.Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02Down with trailing whitespace!Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25Add explicit keywords.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Remove attribution from file headers, per discussion on llvmdev.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-18Replace the original flex lexer with a hand writen one. This Chris Lattner
drops a dependency on flex and lets us make future progress more easily. Yay for 2 fewer .cvs files to make silly conflicts with. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44213 91177308-0d34-0410-b5e6-96231b3b80d8