summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move someDuncan Sands2010-02-161-2/+2
| | | | | | 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-5/+5
| | | | | | | 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-3/+3
| | | | | | 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-121-0/+13
| | | | llvm-svn: 96011
* Minor whitespace cleanups.Dan Gohman2010-02-101-3/+1
| | | | llvm-svn: 95801
* Add a hook to AssemblyAnnotationWriter to allow custom info commentsDan Gohman2010-02-101-0/+5
| | | | | | to be printed, in place of the familiar "uses=" comments. llvm-svn: 95798
* Print a comment next to "materializable" global values, to distinguishDan Gohman2010-01-291-0/+9
| | | | | | them from values that are not actually defined in the module. llvm-svn: 94854
* Convert some users of ftostr to raw_ostream.Benjamin Kramer2010-01-291-2/+4
| | | | llvm-svn: 94808
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-2/+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
* Refactor common parts of MDNode::getFunction() and assertLocalFunction() ↵Victor Hernandez2010-01-201-1/+1
| | | | | | into getFunctionForValue() llvm-svn: 93977
* Make printing of metadata more robust when function is not found (which is ↵Victor Hernandez2010-01-181-1/+1
| | | | | | the normal situation for non function-local metadata) llvm-svn: 93748
* Fix printing of function-local metadata in AsmWriterVictor Hernandez2010-01-141-2/+3
| | | | llvm-svn: 93402
* Further progration of metadata operands. TheDale Johannesen2010-01-131-0/+5
| | | | | | | dumper doesn't really do what I want yet, but at least it doesn't crash now. llvm-svn: 93272
* Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}Devang Patel2010-01-051-6/+5
| | | | llvm-svn: 92783
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92760
* Change errs() to dbgs().David Greene2010-01-051-5/+6
| | | | llvm-svn: 92652
* fix refactoroChris Lattner2009-12-311-1/+1
| | | | llvm-svn: 92349
* use early exits to reduce indentation.Chris Lattner2009-12-311-15/+16
| | | | llvm-svn: 92335
* eliminate another copy of the mdnode printing logic, simplify theChris Lattner2009-12-311-32/+23
| | | | | | one that remains. llvm-svn: 92334
* random tidying for MDNode printing.Chris Lattner2009-12-311-10/+7
| | | | llvm-svn: 92333
* eliminate a bunch of useless forwarding functions with one caller.Chris Lattner2009-12-311-21/+11
| | | | llvm-svn: 92332
* make mdnMap type safe, rename accessors for consistency with the rest of llvm.Chris Lattner2009-12-311-12/+13
| | | | llvm-svn: 92331
* metadata can't be a global var initializer.Chris Lattner2009-12-311-4/+0
| | | | llvm-svn: 92330
* simplify mdnode printing logic. Now N->dump() onlyChris Lattner2009-12-311-127/+105
| | | | | | dumps one node instead of all of them. llvm-svn: 92329
* unify two copies of the NamedMDNode printing code.Chris Lattner2009-12-311-25/+22
| | | | llvm-svn: 92327
* fix printing of function-local metadata to print all the operands of theChris Lattner2009-12-311-2/+2
| | | | | | mdnode, not just operand 0 over and over. llvm-svn: 92326
* simplify printing of mdstring and Argument.Chris Lattner2009-12-311-12/+5
| | | | llvm-svn: 92325
* simplify asmprinting of NamedMDNodeChris Lattner2009-12-311-34/+4
| | | | llvm-svn: 92324
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-19/+19
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Do not crash when .ll printing metadata that smells like debug info, but isn't.Chris Lattner2009-12-291-3/+2
| | | | llvm-svn: 92268
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-2/+1
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* tidy up debug info comments, use ->isVoidTy() where reasonable.Chris Lattner2009-12-291-25/+25
| | | | llvm-svn: 92249
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-24/+19
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getHandlerNames to getMDKindNames, simplify its interfaceChris Lattner2009-12-281-14/+6
| | | | | | and simplify all the clients that use it. llvm-svn: 92224
* change the strange MetadataContext::getMDs function to expose lessChris Lattner2009-12-281-2/+2
| | | | | | irrelevant internal implementation details to clients. llvm-svn: 92210
* Formalize MDNode's function-localness:Victor Hernandez2009-12-181-5/+4
| | | | | | | | | | | - an MDNode is designated as function-local when created, and continues to be even if its operands are modified not to refer to function-local IR - function-localness is designated via lowest bit in SubclassData - getLocalFunction() descends MDNode tree to see if it is consistently function-local Add verification of MDNodes to checks that MDNodes are consistently function-local. Update AsmWriter to use isFunctionLocal(). llvm-svn: 91708
* Add MSP430 interrupt calling conv. No functionality change yet.Anton Korobeynikov2009-12-071-0/+3
| | | | llvm-svn: 90738
* Avoid creating a metadata slot for all metadata that contains an instructionVictor Hernandez2009-12-041-6/+6
| | | | llvm-svn: 90581
* Fix crasher when N->getElement(n) is NULLVictor Hernandez2009-12-041-1/+1
| | | | llvm-svn: 90572
* Teach AsmWriter to write inline (not via a global metadata slot) metadata ↵Victor Hernandez2009-12-041-1/+25
| | | | | | that contains an instruction llvm-svn: 90512
* Special case FixedStackPseudoSourceValueVal as well. Do we really need to ↵Evan Cheng2009-11-161-1/+2
| | | | | | differentiate PseudoSourceValueVal from FixedStackPseudoSourceValueVal at this level? llvm-svn: 88902
* Remove extraneous commit.Eric Christopher2009-11-131-5/+0
| | | | llvm-svn: 88716
* Print out something, even if it's non-parseable later when we'veEric Christopher2009-11-131-2/+7
| | | | | | got ghost linkage. It's better than aborting. llvm-svn: 88715
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-011-4/+1
| | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699
* Make blockaddress(@func, null) be valid, and make 'deleting a basic Chris Lattner2009-10-311-1/+4
| | | | | | | | | | | | block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1). This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable). llvm-svn: 85678
* Simplify this code and avoid an extra space character in the output.Dan Gohman2009-10-301-2/+1
| | | | llvm-svn: 85568
* asmprinter support for BlockAddress.Chris Lattner2009-10-281-0/+9
| | | | llvm-svn: 85367
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-281-2/+2
| | | | llvm-svn: 85351
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-271-1/+14
| | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. llvm-svn: 85274
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-271-0/+1
| | | | llvm-svn: 85254
OpenPOWER on IntegriCloud