summaryrefslogtreecommitdiff
path: root/include/llvm-c
Commit message (Collapse)AuthorAge
* Add support for accessing an MDNode's operands via the C binding. Patch byDuncan Sands2012-09-19
| | | | | | | Anthony Bryant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164247 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure macros in the include subdirectory are not used without being defined.Bob Wilson2012-09-04
| | | | | | | | | | | | | | | | 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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163148 91177308-0d34-0410-b5e6-96231b3b80d8
* replace a couple of single-line comments with /* */ to fix the build of ↵Nuno Lopes2012-09-02
| | | | | | stuff depending on the C headers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163095 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-17
| | | | | | | | | | | | | | | | | | | | | 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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162114 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple of addition comment fixesEli Bendersky2012-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161678 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a couple of typos in commentsEli Bendersky2012-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161677 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs.Bill Wendling2012-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160473 91177308-0d34-0410-b5e6-96231b3b80d8
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-29
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157885 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce llvm-c function LLVMPrintModuleToFile.Hans Wennborg2012-05-09
| | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156479 91177308-0d34-0410-b5e6-96231b3b80d8
* Supply a C interface to the "LinkModules" method.Bill Wendling2012-05-09
| | | | | | | Patch by Andrew Wilkins! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156469 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-c] Make a few function declarations proper prototypesAnders Waldenborg2012-05-02
| | | | | | | | | | | This avoids warnings when included in a application that uses -Wstrict-prototypes. e.g: AsmPrinters.def:27:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155997 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove lto_codegen_set_whole_program_optimization. It is a work in progress,Rafael Espindola2012-04-16
| | | | | | | | | so we don't want it to show up in the stable 3.1 interface. While at it, add a comment about why LTOCodeGenerator manually creates the internalize pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a C binding to the Target and TargetMachine classes to allow for emittingDuncan Sands2012-04-11
| | | | | | | | binary and assembly. Patch by Carlo Kok. Emitting was inspired by but not based on the D llvm bindings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154493 91177308-0d34-0410-b5e6-96231b3b80d8
* s/lto_codegen_whole_program_optimization/lto_codegen_set_whole_program_optim ↵Bill Wendling2012-04-09
| | | | | | ization/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154312 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a hook to turn on the internalize pass through the LTO interface.Bill Wendling2012-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154306 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup whitespace and remove unneeded 'extern' keyword on function definitions.Bill Wendling2012-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153802 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'undef's to make SWIG happier. Patch by Baozeng Ding.Bill Wendling2012-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153479 91177308-0d34-0410-b5e6-96231b3b80d8
* add load/store volatility control to the C API, patch by Yiannis Tsiouris!Chris Lattner2012-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153238 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish organizing C API docs.Gregory Szorc2012-03-21
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153169 91177308-0d34-0410-b5e6-96231b3b80d8
* Organize LLVM C API docs into doxygen modules; add docsGregory Szorc2012-03-21
| | | | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153157 91177308-0d34-0410-b5e6-96231b3b80d8
* [unwind removal] Remove all of the code for the dead 'unwind' instruction. ThereBill Wendling2012-02-06
| | | | | | | | were no 'unwind' instructions being generated before this, so this is in effect a no-op. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149906 91177308-0d34-0410-b5e6-96231b3b80d8
* A few of the changes suggested in code review (by Nick Lewycky)Hal Finkel2012-02-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149472 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a basic-block autovectorization pass.Hal Finkel2012-02-01
| | | | | | | This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure. Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149468 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the eh.exception and eh.selector intrinsics. Also remove a hack to copyBill Wendling2012-01-31
| | | | | | | | over the catch information. The catch information is now tacked to the invoke instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149326 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert a tiny bit of r148553 which extended LLVM's function attributesChandler Carruth2012-01-25
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148937 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use my favorite C++11 feature (comma at end of enum).Benjamin Kramer2012-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148555 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend Attributes to 64 bitsKostya Serebryany2012-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148553 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to add named metadata operand.Devang Patel2011-12-20
| | | | | | | Patch by Andrew Wilkins! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146984 91177308-0d34-0410-b5e6-96231b3b80d8
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-17
| | | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed ObjectFile functions:Danil Malyshev2011-11-29
| | | | | | | | | | | | - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145408 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-c: Add a few missing InitializeAll* functions.Daniel Dunbar2011-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145330 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r145180 as it is causing test failures on all the bots.Chandler Carruth2011-11-27
| | | | | | | | | | | | | Original commit message: Fixed ObjectFile functions: - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145182 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed ObjectFile functions:Danil Malyshev2011-11-27
| | | | | | | | | | | - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145180 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove declarations for functions that don't exist (and never have).Chad Rosier2011-11-04
| | | | | | | Patch by Anders Waldenborg <anders@0x63.nu>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143705 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose relocation accessors through the libObject C API.Owen Anderson2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143109 91177308-0d34-0410-b5e6-96231b3b80d8
* Add relocation iterators to the libObject C API.Owen Anderson2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143107 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVMBool for a function that logically returns a boolean value.Owen Anderson2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142683 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Owen Anderson2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142681 91177308-0d34-0410-b5e6-96231b3b80d8
* Bind libObject API for obtaining the section containing a Symbol.Owen Anderson2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142667 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand the coverage of the libObject C bindings to include more SectionRef ↵Owen Anderson2011-10-21
| | | | | | accessors as well as Symbol iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142661 91177308-0d34-0410-b5e6-96231b3b80d8
* ocaml bindings: introduce classify_valueTorok Edwin2011-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141991 91177308-0d34-0410-b5e6-96231b3b80d8
* ocaml bindings: add getopcode for constant and instruction, and int64_of_const.Torok Edwin2011-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141990 91177308-0d34-0410-b5e6-96231b3b80d8
* Change relocation API to be per section. This time without breaking GCC.Michael J. Spencer2011-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141385 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 141376 and 141377 due to breaking the build.Bill Wendling2011-10-07
| | | | | | | | | | | | | | | | | | --- Reverse-merging r141377 into '.': U tools/llvm-objdump/MachODump.cpp --- Reverse-merging r141376 into '.': U include/llvm/Object/COFF.h U include/llvm/Object/ObjectFile.h U include/llvm-c/Object.h U tools/llvm-objdump/llvm-objdump.cpp U lib/Object/MachOObjectFile.cpp U lib/Object/COFFObjectFile.cpp U lib/Object/Object.cpp U lib/Object/ELFObjectFile.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141379 91177308-0d34-0410-b5e6-96231b3b80d8
* Change relocation API to be per section.Michael J. Spencer2011-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141376 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't require C bindings opcode numbers to be kept in sync.Torok Edwin2011-10-06
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141290 91177308-0d34-0410-b5e6-96231b3b80d8
* Add uwtable, returnstwice and nonlazybind to the C bindings also.Torok Edwin2011-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141289 91177308-0d34-0410-b5e6-96231b3b80d8
* ocaml/C bindings: type->isSized()Torok Edwin2011-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141288 91177308-0d34-0410-b5e6-96231b3b80d8
* add binding to read icmp predicateTorok Edwin2011-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141287 91177308-0d34-0410-b5e6-96231b3b80d8