summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Use LLVMContext for generating UndefValue constants too!Owen Anderson2009-07-022-7/+9
| | | | llvm-svn: 74703
* Try again at converting the LLParser to use LLVMContext, without massive ↵Owen Anderson2009-07-012-47/+55
| | | | | | breakage this time. llvm-svn: 74671
* 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
* --- Reverse-merging (from foreign repository) r74648 into '.':Bill Wendling2009-07-012-9/+5
| | | | | | | | | | | U include/llvm/LLVMContext.h U lib/VMCore/LLVMContext.cpp U lib/AsmParser/LLParser.cpp U lib/AsmParser/LLParser.h Temporarily reverting r74648. It was causing massive failures in release mode. llvm-svn: 74653
* Convert LLParser to use LLVMContext for creating constants.Owen Anderson2009-07-012-5/+9
| | | | llvm-svn: 74648
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-2/+2
| | | | llvm-svn: 74640
* Support stand alone metadata syntax.Devang Patel2009-07-012-1/+43
| | | | | | | !0 = constant metadata !{i32 21, i32 22} @llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0} llvm-svn: 74630
* 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
* improve the APIs for creating struct and function types with no ↵Chris Lattner2009-07-011-1/+1
| | | | | | | | arguments/elements to not have to create a temporary vector (in the API at least). Patch by Jay Foad! llvm-svn: 74584
* Address review comments: add 3 ARM calling conventions.Anton Korobeynikov2009-06-163-2/+14
| | | | | | | Dispatch C calling conv. to one of these conventions based on target triple and subtarget features. llvm-svn: 73530
* Fix a typo in a diagnostic.Dan Gohman2009-06-151-1/+1
| | | | llvm-svn: 73429
* Fix old-style type names in comments.Dan Gohman2009-06-141-3/+3
| | | | llvm-svn: 73362
* Create FunctionType::isValidArgumentType to go along with isValidReturnType.Nick Lewycky2009-06-071-5/+11
| | | | | | | | | | | | | | | Also create isValidElementType for ArrayType, PointerType, StructType and VectorType. Make LLParser use them. This closes up some holes like an assertion failure on: %x = type {label} but largely doesn't change any semantics. The only thing we accept now which we didn't before is vectors of opaque type such as "<4 x opaque>". The opaque can be resolved to an int or float when linking. llvm-svn: 73016
* Refuse metadata* type for function arguments.Nick Lewycky2009-06-071-1/+3
| | | | llvm-svn: 73010
* Add new function attribute - noimplicitfloatDevang Patel2009-06-053-19/+22
| | | | | | | Update code generator to use this attribute and remove NoImplicitFloat target option. Update llc to set this attribute when -no-implicit-float command line option is used. llvm-svn: 72959
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-043-4/+15
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Add new function attribute - noredzone. Devang Patel2009-06-043-1/+3
| | | | | | | Update code generator to use this attribute and remove DisableRedZone target option. Update llc to set this attribute when -disable-red-zone command line option is used. llvm-svn: 72894
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-301-0/+1
| | | | llvm-svn: 72610
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-9/+9
| | | | llvm-svn: 72210
* Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky2009-05-102-10/+18
| | | | | | | Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
* testcase and asmparser fix for PR4066Chris Lattner2009-04-251-2/+5
| | | | llvm-svn: 70080
* Fix warning in .ll parser, detect and reject available_externally on functionNick Lewycky2009-04-131-0/+1
| | | | | | declarations. llvm-svn: 68944
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-133-1/+5
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-044-1/+49
| | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. llvm-svn: 68420
* Fix a bug in our autoupgrade support: in an argument list to a functionChris Lattner2009-03-251-4/+8
| | | | | | | | | | | | call, we should treat "i64 zext" as the start of a constant expr, but "i64 0 zext" as an argument with an obsolete attribute on it (this form is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll). Make the autoupgrade logic more discerning to avoid treating "i64 zext" as an old-style attribute, causing us to reject a valid constant expr. This fixes PR3876. llvm-svn: 67682
* Fix internal representation of fp80 to be theDale Johannesen2009-03-232-1/+35
| | | | | | | | | | 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. llvm-svn: 67562
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-113-8/+3
| | | | | | linkage, so remove it. llvm-svn: 66690
* Remove the one-definition-rule version of extern_weakDuncan Sands2009-03-113-15/+8
| | | | | | | linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
* Fix two classes of bugs. First:Chris Lattner2009-03-092-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-073-24/+48
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Fix a pretty awesome bug that only happened in a strange case with anonymousChris Lattner2009-03-011-8/+11
| | | | | | types. This was reading the uint for the keyword after the token was advanced. llvm-svn: 65743
* reject 0 element vectors with:Chris Lattner2009-02-281-0/+2
| | | | | | | | | @a = internal constant void bitcast(<0 x i8> <> to void) ^ Fixes PR3685 llvm-svn: 65698
* add proper asmwriter and asmparser support for anonymous functions.Chris Lattner2009-02-181-3/+13
| | | | llvm-svn: 64953
* Pacify gcc-4.3 (thinks IsConstant may be usedDuncan Sands2009-02-101-1/+3
| | | | | | uninitialized). llvm-svn: 64220
* Use slightly more correct grammar in error messages.Dan Gohman2009-02-091-2/+2
| | | | llvm-svn: 64148
* fix typoChris Lattner2009-02-081-1/+1
| | | | llvm-svn: 64091
* reject void pointers with a nice error:Chris Lattner2009-02-081-1/+5
| | | | | | | | | | llvm-as: t.ll:2:15: pointers to void are invalid, use i8* instead %X = type void* ^ instead of asserting and dying. llvm-svn: 64089
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-051-9/+0
| | | | llvm-svn: 63812
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-041-0/+9
| | | | | | and llvm-gcc. llvm-svn: 63786
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-041-9/+0
| | | | | | | | | target directories themselves. This also means that VMCore no longer needs to know about every target's list of intrinsics. Future work will include converting the PowerPC target to this interface as an example implementation. llvm-svn: 63765
* Fix PR3372Chris Lattner2009-02-021-2/+3
| | | | llvm-svn: 63501
* Add the private linkage.Rafael Espindola2009-01-153-2/+8
| | | | llvm-svn: 62279
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-091-2/+2
| | | | llvm-svn: 61991
* 61949 accidentally introduced an escaped newline. Fix this by makingDan Gohman2009-01-081-1/+1
| | | | | | the comment a little more verbose. llvm-svn: 61959
* Fix the comment for lltok::backslash.Dan Gohman2009-01-081-1/+1
| | | | llvm-svn: 61949
* Fix the path to llvm/Assembly/Parser.h in a comment.Dan Gohman2009-01-081-1/+1
| | | | llvm-svn: 61948
* one more crash from PR3281, we now diagnose:Chris Lattner2009-01-081-2/+9
| | | | | | | llvm-as: t.ll:2:39: function may not return opaque type %"bwmoyl" = tail call coldcc opaque @g() ^ llvm-svn: 61933
* fix wordoChris Lattner2009-01-051-1/+1
| | | | llvm-svn: 61728
* Remove redundant ValID::ValID:: scoping (doesn't compile on Windows).Steve Naroff2009-01-051-1/+1
| | | | llvm-svn: 61727
* Reject PR3281:accepted03.ll with:Chris Lattner2009-01-052-6/+11
| | | | | | | | llvm-as: accepted03.ll:1:35: invalid unresolved type up reference declare void @r({ \7, opaque, \10 } %su) ^ llvm-svn: 61725
OpenPOWER on IntegriCloud