summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Core.h
Commit message (Collapse)AuthorAgeFilesLines
* [unwind removal] Remove all of the code for the dead 'unwind' instruction. ThereBill Wendling2012-02-061-3/+1
| | | | | | | were no 'unwind' instructions being generated before this, so this is in effect a no-op. llvm-svn: 149906
* Remove the eh.exception and eh.selector intrinsics. Also remove a hack to copyBill Wendling2012-01-311-2/+0
| | | | | | | over the catch information. The catch information is now tacked to the invoke instruction. llvm-svn: 149326
* Revert a tiny bit of r148553 which extended LLVM's function attributesChandler Carruth2012-01-251-2/+6
| | | | | | | | | | | | | | | | | to 64-bits, and added a new attribute in bit #32. Specifically, remove this new attribute from the enum used in the C API. It's not yet clear what the best approach is for exposing these new attributes in the C API, and several different proposals are on the table. Until then, we can simply not expose this bit in the API at all. Also, I've reverted a somewhat unrelated change in the same revision which switched from "1 << 31" to "1U << 31" for the top enum. While "1 << 31" is technically undefined behavior, implementations DTRT here. However, MS and -pedantic mode warn about non-'int' type enumerator values. If folks feel strongly about this I can put the 'U' back in, but it seemed best to wait for the proper solution. llvm-svn: 148937
* Don't use my favorite C++11 feature (comma at end of enum).Benjamin Kramer2012-01-201-1/+1
| | | | llvm-svn: 148555
* Extend Attributes to 64 bitsKostya Serebryany2012-01-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. llvm-svn: 148553
* Add support to add named metadata operand.Devang Patel2011-12-201-0/+2
| | | | | | Patch by Andrew Wilkins! llvm-svn: 146984
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-171-0/+3
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* Remove declarations for functions that don't exist (and never have).Chad Rosier2011-11-041-3/+1
| | | | | | Patch by Anders Waldenborg <anders@0x63.nu>. llvm-svn: 143705
* ocaml bindings: introduce classify_valueTorok Edwin2011-10-141-2/+7
| | | | llvm-svn: 141991
* ocaml bindings: add getopcode for constant and instruction, and int64_of_const.Torok Edwin2011-10-141-0/+1
| | | | llvm-svn: 141990
* Don't require C bindings opcode numbers to be kept in sync.Torok Edwin2011-10-061-3/+5
| | | | | | | | They are not in sync now, for example Bitcast would show up as LLVMCall. So instead introduce 2 functions that map to and from the opcodes in the C bindings. llvm-svn: 141290
* Add uwtable, returnstwice and nonlazybind to the C bindings also.Torok Edwin2011-10-061-1/+4
| | | | llvm-svn: 141289
* ocaml/C bindings: type->isSized()Torok Edwin2011-10-061-0/+1
| | | | llvm-svn: 141288
* add binding to read icmp predicateTorok Edwin2011-10-061-0/+1
| | | | llvm-svn: 141287
* ocaml/C bindings: getmdstring, add num_op, get_op should work on metadata tooTorok Edwin2011-10-061-0/+5
| | | | llvm-svn: 141286
* C/OCaml API to retrieve struct name.Torok Edwin2011-10-061-0/+1
| | | | llvm-svn: 141285
* Add C api for Instruction->eraseFromParent().Devang Patel2011-10-031-0/+1
| | | | llvm-svn: 141023
* Add some useful accessors to c++ api that appear to be missing from the c apiNate Begeman2011-08-231-2/+8
| | | | llvm-svn: 138371
* C API functions must be able to see their extern "C" definitions, or it will ↵Benjamin Kramer2011-08-191-0/+3
| | | | | | be impossible to call them from C. llvm-svn: 138022
* Initial commit of the 'landingpad' instruction.Bill Wendling2011-08-121-1/+14
| | | | | | | | | | | | This implements the 'landingpad' instruction. It's used to indicate that a basic block is a landing pad. There are several restrictions on its use (see LangRef.html for more detail). These restrictions allow the exception handling code to gather the information it needs in a much more sane way. This patch has the definition, implementation, C interface, parsing, and bitcode support in it. llvm-svn: 137501
* Remove the LLVMBuildUnwind C API function.Bill Wendling2011-08-021-3/+1
| | | | | | | The 'unwind' function is going away with the new EH rewrite. This is step 0 in keeping front-ends from using it. llvm-svn: 136683
* Add the 'resume' instruction for the new EH rewrite.Bill Wendling2011-07-311-1/+6
| | | | | | | | | This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later). llvm-svn: 136589
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-301-20/+1
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
* LangRef and basic memory-representation/reading/writing for 'cmpxchg' andEli Friedman2011-07-281-2/+4
| | | | | | | | | | | | | | | | | | | | | 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics. The allowed operands for these instructions are heavily restricted at the moment; we can probably loosen it a bit, but supporting general first-class types (where it makes sense) might get a bit complicated, given how SelectionDAG works. As an initial cut, these operations do not support specifying an alignment, but it would be possible to add if we think it's useful. Specifying an alignment lower than the natural alignment would be essentially impossible to support on anything other than x86, but specifying a greater alignment would be possible. I can't think of any useful optimizations which would use that information, but maybe someone else has ideas. Optimizer/codegen support coming soon. llvm-svn: 136404
* Keep enums stable. Append EH stuff to the end.Bill Wendling2011-07-271-49/+52
| | | | llvm-svn: 136263
* Merge the contents from exception-handling-rewrite to the mainline.Bill Wendling2011-07-271-47/+64
| | | | | | This adds the new instructions 'landingpad' and 'resume'. llvm-svn: 136253
* The numbering of LLVMOpcode is supposed to be stable; revert my earlier ↵Eli Friedman2011-07-271-24/+26
| | | | | | change, and append Fence onto the end. llvm-svn: 136245
* Fix a couple minor mistakes pointed out by Bill in adding 'fence' instruction.Eli Friedman2011-07-261-23/+24
| | | | llvm-svn: 136124
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-1/+1
| | | | llvm-svn: 135375
* Add LLVMConstNamedStruct to the C api to let its users create constantsRafael Espindola2011-07-141-0/+3
| | | | | | of named struct types. llvm-svn: 135178
* add a couple more missing C api, patch by Vitaly Lugovskiy!Chris Lattner2011-07-141-0/+3
| | | | llvm-svn: 135151
* add C api for hte new type system rewrite API. Patch by Vitaly Lugovskiy!Chris Lattner2011-07-141-1/+4
| | | | llvm-svn: 135132
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 134829
* Cast unused parameter to void.Hans Wennborg2011-06-041-0/+1
| | | | llvm-svn: 132641
* Declare this function here so that it doesn't get C++ mangling.Nick Lewycky2011-05-151-0/+2
| | | | llvm-svn: 131379
* Expose getTypeName to the C API. Patch by Patrick Walton.Rafael Espindola2011-02-181-0/+1
| | | | llvm-svn: 125845
* I swear I did a make clean and make before committing all this...Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120304
* add a function to the C api to get the context out of a module, patchChris Lattner2010-11-281-0/+3
| | | | | | by Eric Dobson! llvm-svn: 120259
* add a 'LLVMConstIntOfArbitraryPrecision' api to the C api,Chris Lattner2010-11-231-0/+3
| | | | | | patch by Greg Pfeil! llvm-svn: 119989
* Next step on the getting-rid-of-static-ctors train: begin adding per-libraryOwen Anderson2010-10-071-0/+10
| | | | | | | initialization functions that initialize the set of passes implemented in that library. Add C bindings for these functions as well. llvm-svn: 115927
* Add missing X86 MMX declarations. Hopefully fixes buildbot?Dale Johannesen2010-09-101-0/+2
| | | | llvm-svn: 113643
* Add X86 MMX type to bitcode and Type.Dale Johannesen2010-09-101-1/+2
| | | | | | | (The Ada bindings probably need it too, but all the obvious places to change say "do not edit this file".) llvm-svn: 113618
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-281-10/+1
| | | | | | being actively maintained, improved, or extended. llvm-svn: 112356
* Create the new linker type "linker_private_weak_def_auto".Bill Wendling2010-08-201-1/+3
| | | | | | | | | | | It's similar to "linker_private_weak", but it's known that the address of the object is not taken. For instance, functions that had an inline definition, but the compiler decided not to inline it. Note, unlike linker_private and linker_private_weak, linker_private_weak_def_auto may have only default visibility. The symbols are removed by the linker from the final linked image (executable or dynamic library). llvm-svn: 111684
* Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.Erick Tryzelaar2010-08-201-0/+2
| | | | llvm-svn: 111625
* Expose BasicBlock::moveBefore and moveAfter in C API, patchDuncan Sands2010-07-191-0/+3
| | | | | | by Benjamin Saunders. llvm-svn: 108699
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Objective-C metadata types which should be marked as "weak", but which the linker will remove upon final linkage. However, this linkage isn't specific to Objective-C. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". Currently only supported on Darwin platforms. llvm-svn: 107433
* Revert r107205 and r107207.Bill Wendling2010-06-291-2/+1
| | | | llvm-svn: 107215
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-1/+2
| | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". llvm-svn: 107205
* add attributes and module level asm to the ocaml bindings,Chris Lattner2010-04-101-0/+2
| | | | | | patch by Patrick Walton! llvm-svn: 100932
OpenPOWER on IntegriCloud