summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Core.h
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-c] Add LLVMPrintModuleToString.Anders Waldenborg2013-10-161-0/+8
| | | | | | | | | Like LLVMDumpModule but returns the string (that needs to be freed with LLVMDisposeMessage) instead of printing it to stderr. Differential Revision: http://llvm-reviews.chandlerc.com/D1941 llvm-svn: 192821
* Add function attribute 'optnone'.Andrea Di Biagio2013-08-231-2/+3
| | | | | | | | This function attribute indicates that the function is not optimized by any optimization or code generator passes with the exception of interprocedural optimization passes. llvm-svn: 189101
* [typo] An LLVM.Daniel Dunbar2013-08-161-11/+11
| | | | llvm-svn: 188589
* Add a new function attribute 'cold' to functions.Diego Novillo2013-05-241-0/+1
| | | | | | | | | | | Other than recognizing the attribute, the patch does little else. It changes the branch probability analyzer so that edges into blocks postdominated by a cold function are given low weight. Added analysis and code generation tests. Added documentation for the new attribute. llvm-svn: 182638
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-221-0/+1
| | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). llvm-svn: 182448
* Roll out r182407 and r182408 because they broke builds.Filip Pizlo2013-05-211-1/+0
| | | | llvm-svn: 182409
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-211-0/+1
| | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). llvm-svn: 182408
* Fix formatting. Patch by o11c.Duncan Sands2013-05-061-18/+18
| | | | llvm-svn: 181189
* c vs c++ mistake in header file typedef for AtomicRMW fix in rev 180100.Carlo Kok2013-04-231-4/+4
| | | | llvm-svn: 180104
* Expose IRBuilder::CreateAtomicRMW as LLVMBuildAtomicRMW in llvm-c.Carlo Kok2013-04-231-0/+53
| | | | llvm-svn: 180100
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-221-106/+0
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
* C API: Fix coding styleTom Stellard2013-04-181-1/+1
| | | | llvm-svn: 179785
* C API: Add LLVMGetBufferSize()Tom Stellard2013-04-161-0/+1
| | | | llvm-svn: 179647
* C API: Add LLVMGetBufferStart()Tom Stellard2013-04-161-0/+1
| | | | llvm-svn: 179646
* C API: Add LLVMAddTargetDependentFunctionAttr()Tom Stellard2013-04-161-0/+7
| | | | llvm-svn: 179645
* Add four new functions and one new enum to the C API:Hans Wennborg2013-04-161-0/+12
| | | | | | | | | | | | LLVMGetThreadLocalMode - exposes GlobalVariable::getThreadLocalMode LLVMSetThreadLocalMode - exposes GlobalVariable::setThreadLocalMode LLVMIsExternallyInitialized - exposes GlobalVariable::isExternallyInitialized LLVMSetExternallyInitialized - exposes GlobalVariable::setExternallyInitialized LLVMThreadLocalMode - maps to GlobalVariable::ThreadLocalMode Patch by Moritz Maxeiner! llvm-svn: 179588
* Revert r178713Evan Cheng2013-04-041-7/+4
| | | | llvm-svn: 178769
* Make it possible to include llvm-c without including C++ headers. Patch by ↵Evan Cheng2013-04-031-4/+7
| | | | | | Filip Pizlo. llvm-svn: 178713
* Add multithreading functions and shutdown to the C API. Patch by MoritzDuncan Sands2013-02-171-0/+33
| | | | | | Maxeiner. llvm-svn: 175398
* s/bool/LLVMBool/Bill Wendling2013-02-141-1/+1
| | | | llvm-svn: 175203
* Add two new functions to the C API:Bill Wendling2013-02-141-0/+7
| | | | | | | | | LLVMCreateMemoryBufferWithMemoryRange - exposes MemoryBuffer::getMemBuffer LLVMCreateMemoryBufferWithMemoryRangeCopy - exposes MemoryBuffer::getMemBufferCopy Patch by Moritz Maxeiner! llvm-svn: 175199
* Add the IR attribute 'sspstrong'.Bill Wendling2013-01-231-2/+3
| | | | | | | | | | | | | | | | | | | | | SSPStrong applies a heuristic to insert stack protectors in these situations: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) This patch implements the SSPString attribute to be equivalent to SSPRequired. This will change in a subsequent patch. llvm-svn: 173230
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Move the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-151-1/+1
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165960
* Use builder to create alignment attributes. Remove dead function.Bill Wendling2012-10-141-1/+1
| | | | llvm-svn: 165890
* Update comment.Bill Wendling2012-10-081-1/+1
| | | | llvm-svn: 165461
* Add support for accessing an MDNode's operands via the C binding. Patch byDuncan Sands2012-09-191-0/+21
| | | | | | Anthony Bryant. llvm-svn: 164247
* Make sure macros in the include subdirectory are not used without being defined.Bob Wilson2012-09-041-1/+1
| | | | | | | | | | | | | | | | Rationale: For each preprocessor macro, either the definedness is what's meaningful, or the value is what's meaningful, or both. If definedness is meaningful, we should use #ifdef. If the value is meaningful, we should use and #ifdef interchangeably for the same macro, seems ugly to me, even if undefined macros are zero if used. This also has the benefit that including an LLVM header doesn't prevent you from compiling with -Wundef -Werror. Patch by John Garvin! <rdar://problem/12189979> llvm-svn: 163148
* replace a couple of single-line comments with /* */ to fix the build of ↵Nuno Lopes2012-09-021-4/+5
| | | | | | stuff depending on the C headers llvm-svn: 163095
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-171-3/+2
| | | | | | | | | | | | | | | | | | | | make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. <rdar://problem/11754934> llvm-svn: 162114
* A couple of addition comment fixesEli Bendersky2012-08-101-2/+2
| | | | llvm-svn: 161678
* Fix a couple of typos in commentsEli Bendersky2012-08-101-2/+2
| | | | llvm-svn: 161677
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-291-1/+1
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157885
* Introduce llvm-c function LLVMPrintModuleToFile.Hans Wennborg2012-05-091-0/+9
| | | | | | | | | This lets you save the textual representation of the LLVM IR to a file. Before this patch it could only be printed to STDERR from llvm-c. Patch by Carlo Kok! llvm-svn: 156479
* add load/store volatility control to the C API, patch by Yiannis Tsiouris!Chris Lattner2012-03-221-0/+2
| | | | llvm-svn: 153238
* Finish organizing C API docs.Gregory Szorc2012-03-211-67/+194
| | | | | | | | | | Remaining "uncategorized" functions have been organized into their proper place in the hierarchy. Some functions were moved around so groups are defined together. No code changes were made. llvm-svn: 153169
* Organize LLVM C API docs into doxygen modules; add docsGregory Szorc2012-03-211-109/+1456
| | | | | | | | | | | | | | | | This gives a lot of love to the docs for the C API. Like Clang's documentation, the C API is now organized into a Doxygen "module" (LLVMC). Each C header file is a child of the main module. Some modules (like Core) have a hierarchy of there own. The produced documentation is thus better organized (before everything was in one monolithic list). This patch also includes a lot of new documentation for APIs in Core.h. It doesn't document them all, but is better than none. Function docs are missing @param and @return annotation, but the documentation body now commonly provides help details (like the expected llvm::Value sub-type to expect). llvm-svn: 153157
* [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
OpenPOWER on IntegriCloud