summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
* fix a crash on invalid metadata, e.g.: call i32 @foo(), XXXXChris Lattner2010-04-072-3/+5
| | | | | | | | 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. llvm-svn: 100602
* enhance SMDiagnostic to also maintain a pointer to the SourceMgr.Chris Lattner2010-04-061-2/+2
| | | | | | | Add a simplified constructor for clients that don't have locations like "file not found" errors. llvm-svn: 100538
* Give llvm::SourceMgr the ability to have a client-specifiedChris Lattner2010-04-061-1/+1
| | | | | | diagnostic handler. llvm-svn: 100503
* stringref-ize the MemoryBuffer::get apis. This requiresChris Lattner2010-04-051-1/+1
| | | | | | a co-committed clang patch. llvm-svn: 100485
* include header.Chris Lattner2010-04-011-0/+1
| | | | llvm-svn: 100087
* rewrite handling of forward ref'd instruction metadata Chris Lattner2010-04-012-9/+60
| | | | | | | | 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. llvm-svn: 100086
* no really, we don't need to copy strings around in the accessor.Chris Lattner2010-04-011-1/+1
| | | | llvm-svn: 100083
* eliminate a temporary smallvectorChris Lattner2010-04-012-13/+5
| | | | llvm-svn: 100082
* Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move someDuncan Sands2010-02-161-7/+7
| | | | | | methods to try to have the type predicates be more logically positioned. llvm-svn: 96349
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-17/+17
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-18/+18
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner2010-02-124-9/+77
| | | | llvm-svn: 96011
* Add a new function attribute, 'alignstack'. It will indicate (when the backendsCharles Davis2010-02-122-0/+29
| | | | | | | implement support for it) that the stack should be forcibly realigned in the prologue (and the process reversed in the epilogue). llvm-svn: 95945
* Reintroduce the InlineHint function attribute.Jakob Stoklund Olesen2010-02-063-0/+3
| | | | | | | | | | | | This time it's for real! I am going to hook this up in the frontends as well. The inliner has some experimental heuristics for dealing with the inline hint. When given a -respect-inlinehint option, functions marked with the inline keyword are given a threshold just above the default for -O3. We need some experiments to determine if that is the right thing to do. llvm-svn: 95466
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-1/+0
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* Remove MetadataBase class because it is not adding significant value.Devang Patel2010-01-221-1/+0
| | | | llvm-svn: 94243
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+1
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* Make the parser include the lower level error message in its own errorDan Gohman2010-01-211-1/+2
| | | | | | message, to be more informative. llvm-svn: 94072
* Remove the InlineHint attribute. There are no current or plannedEric Christopher2010-01-153-3/+0
| | | | | | users. llvm-svn: 93558
* Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, ↵Victor Hernandez2010-01-112-111/+74
| | | | | | and ConvertValIDToValue into a more powerful ConvertValIDToValue() that does all three's work llvm-svn: 93197
* Compute isFunctionLocal in MDNode ctor or via argument in new function ↵Victor Hernandez2010-01-102-18/+17
| | | | | | | | getWhenValsUnresolved(). Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue(). llvm-svn: 93108
* fix PR5983, reject function bodies with no blocks per the grammar.Chris Lattner2010-01-091-0/+4
| | | | llvm-svn: 93067
* When parsing function-local metadata, create a function-local MDNodeVictor Hernandez2010-01-062-10/+16
| | | | llvm-svn: 92838
* Re-add parsing of function-local metadata; this time with testcase.Victor Hernandez2010-01-052-21/+28
| | | | llvm-svn: 92793
* Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel2010-01-051-0/+6
| | | | llvm-svn: 92783
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92771
* NamedMDNode is a collection MDNodes.Devang Patel2010-01-051-2/+1
| | | | llvm-svn: 92761
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-6/+3
| | | | | | dereference the type pointer. llvm-svn: 92726
* remove some fixme'sChris Lattner2009-12-301-2/+0
| | | | llvm-svn: 92304
* now that instruction metadata is only parsed in one place, eliminate theChris Lattner2009-12-302-10/+12
| | | | | | | parser-global MDsOnInst vector and make ParseInstructionMetadata return its result by-ref through an argument like the entire rest of the parser. llvm-svn: 92302
* reimplement ParseOptionalInfo as ParseOptionalCommaAlign, correctlyChris Lattner2009-12-302-37/+46
| | | | | | handle the comma case for metadata. llvm-svn: 92301
* rename ParseOptionalCustomMetadata -> ParseInstructionMetadata,Chris Lattner2009-12-302-20/+11
| | | | | | | and make it non-optional. This fixes the bug where we'd accept and ignore a spurious comma after some instructions. llvm-svn: 92300
* convert 4 more instructions over.Chris Lattner2009-12-302-31/+24
| | | | llvm-svn: 92299
* add facilities to start factoring instruction metadata parsingChris Lattner2009-12-302-14/+33
| | | | | | out of each opcode's handler. Change ret over so far. llvm-svn: 92298
* reimplement insertvalue/extractvalue metadata handling to not blindly Chris Lattner2009-12-302-10/+35
| | | | | | accept invalid input. Actually add a testcase. llvm-svn: 92297
* remove two bogus calls that accepted metadata in the middle of ↵Chris Lattner2009-12-301-5/+0
| | | | | | | | insert/extract value *constant exprs*. llvm-svn: 92296
* rename NamedOrCustomMD -> MetadataVar to follow conventions of all the rest ↵Chris Lattner2009-12-303-22/+24
| | | | | | of the code. llvm-svn: 92295
* rename lltok::Metadata -> lltok::exclaim. We name tokens Chris Lattner2009-12-304-19/+15
| | | | | | after their syntactic form, not their semantic form. llvm-svn: 92294
* rename MetadataCache -> NumberedMetadata to follow the conventionChris Lattner2009-12-302-17/+18
| | | | | | | used by other things. Convert it to a vector since it is a dense numbering. llvm-svn: 92293
* rewrite ParseMDNodeVector to follow the normal patter used in the .ll parser.Chris Lattner2009-12-302-31/+40
| | | | llvm-svn: 92292
* rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as ↵Chris Lattner2009-12-302-6/+6
| | | | | | you'd expect. llvm-svn: 92291
* fix parsing of mdstring values.Chris Lattner2009-12-301-7/+4
| | | | llvm-svn: 92290
* remove the code added in r90497. It has several major issues and no tests.Chris Lattner2009-12-302-43/+2
| | | | llvm-svn: 92288
* split t_Metadata into t_MDNode and t_MDString, eliminating some unsafe casting.Chris Lattner2009-12-302-24/+36
| | | | llvm-svn: 92287
* factor code even more.Chris Lattner2009-12-291-26/+14
| | | | llvm-svn: 92280
* simplify some code and unbreak the build by not consuming anChris Lattner2009-12-291-10/+4
| | | | | | extra token. llvm-svn: 92279
* remove a really wrong parenthesis.Benjamin Kramer2009-12-291-1/+1
| | | | llvm-svn: 92277
* clean up some really strange code.Chris Lattner2009-12-291-8/+8
| | | | llvm-svn: 92275
* change ParseMDString and ParseMDNode to take arguments of the right type.Chris Lattner2009-12-292-18/+27
| | | | | | | This exposed a raft of other problems, which I'll deal with in subsequent patches. llvm-svn: 92273
OpenPOWER on IntegriCloud