summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add C API for specifying CPU to the disassembler.Jim Grosbach2012-12-071-1/+14
| | | | | | | | | It was a nasty oversight that we didn't include this when we added this API in the first place. Blech. rdar://12839439 llvm-svn: 169653
* Added a option to the disassembler to print immediates as hex.Kevin Enderby2012-12-051-0/+2
| | | | | | | | | | | | | | | | | | | | This is for the lldb team so most of but not all of the values are to be printed as hex with this option. Some small values like the scale in an X86 address were requested to printed in decimal without the leading 0x. There may be some tweaks need to places that may still be in decimal that they want in hex. Specially for arm. I made my best guess. Any tweaks from here should be simple. I also did the best I know now with help from the C++ gurus creating the cleanest formatImm() utility function and containing the changes. But if someone has a better idea to make something cleaner I'm all ears and game for changing the implementation. rdar://8109283 llvm-svn: 169393
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-0/+1
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* libLTO: Add a utility method to initialize the disassemblers.Benjamin Kramer2012-11-241-0/+7
| | | | | | | | | | | | Necessary to give disassembler users (like darwin's otool) a possibility to dlopen libLTO and still initialize the required LLVM bits. This used to go through libMCDisassembler but that's a gross layering violation, the MC layer can't pull in functions from the targets. Adding a function to libLTO is a bit of a hack but not worse than exposing other disassembler bits from libLTO. Fixes PR14362. llvm-svn: 168545
* Add support for annotated disassembly output for X86 and arm.Kevin Enderby2012-10-221-0/+9
| | | | | | | | | | | Per the October 12, 2012 Proposal for annotated disassembly output sent out by Jim Grosbach this set of changes implements this for X86 and arm. The llvm-mc tool now has a -mdis option to produced the marked up disassembly and a couple of small example test cases have been added. rdar://11764962 llvm-svn: 166445
* Symbol hygiene: Make sure declarations and definitions match, make helper ↵Benjamin Kramer2012-10-201-0/+3
| | | | | | functions static. llvm-svn: 166376
* 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
* Resubmit the changes to llvm core to update the functions to support ↵Micah Villmow2012-10-151-0/+10
| | | | | | different pointer sizes on a per address space basis. llvm-svn: 165941
* Use builder to create alignment attributes. Remove dead function.Bill Wendling2012-10-141-1/+1
| | | | llvm-svn: 165890
* Revert 165732 for further review.Micah Villmow2012-10-111-10/+0
| | | | llvm-svn: 165747
* Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow2012-10-111-0/+10
| | | | | | per address space pointer sizes to be optimized correctly. llvm-svn: 165726
* Update comment.Bill Wendling2012-10-081-1/+1
| | | | llvm-svn: 165461
* Move TargetData to DataLayout.Micah Villmow2012-10-082-19/+19
| | | | llvm-svn: 165402
* 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
* Remove tabs.Bill Wendling2012-07-191-3/+3
| | | | llvm-svn: 160473
* 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
* Supply a C interface to the "LinkModules" method.Bill Wendling2012-05-091-0/+42
| | | | | | Patch by Andrew Wilkins! llvm-svn: 156469
* [llvm-c] Make a few function declarations proper prototypesAnders Waldenborg2012-05-021-6/+6
| | | | | | | | | 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] llvm-svn: 155997
* Remove lto_codegen_set_whole_program_optimization. It is a work in progress,Rafael Espindola2012-04-161-6/+0
| | | | | | | | | 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. llvm-svn: 154807
* Add a C binding to the Target and TargetMachine classes to allow for emittingDuncan Sands2012-04-111-0/+142
| | | | | | | binary and assembly. Patch by Carlo Kok. Emitting was inspired by but not based on the D llvm bindings. llvm-svn: 154493
* s/lto_codegen_whole_program_optimization/lto_codegen_set_whole_program_optim ↵Bill Wendling2012-04-091-1/+1
| | | | | | ization/ llvm-svn: 154312
* Add a hook to turn on the internalize pass through the LTO interface.Bill Wendling2012-04-091-2/+6
| | | | llvm-svn: 154306
* Cleanup whitespace and remove unneeded 'extern' keyword on function definitions.Bill Wendling2012-03-311-16/+17
| | | | llvm-svn: 153802
* Add 'undef's to make SWIG happier. Patch by Baozeng Ding.Bill Wendling2012-03-261-0/+3
| | | | llvm-svn: 153479
* 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-2116-109/+1622
| | | | | | | | | | | | | | | | 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
* A few of the changes suggested in code review (by Nick Lewycky)Hal Finkel2012-02-011-1/+1
| | | | llvm-svn: 149472
* Add a basic-block autovectorization pass.Hal Finkel2012-02-012-0/+38
| | | | | | | 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). llvm-svn: 149468
* 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
* Fixed ObjectFile functions:Danil Malyshev2011-11-291-1/+2
| | | | | | | | | | | - 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. llvm-svn: 145408
* llvm-c: Add a few missing InitializeAll* functions.Daniel Dunbar2011-11-291-0/+52
| | | | llvm-svn: 145330
* Revert r145180 as it is causing test failures on all the bots.Chandler Carruth2011-11-271-2/+1
| | | | | | | | | | | | | 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. llvm-svn: 145182
* Fixed ObjectFile functions:Danil Malyshev2011-11-271-1/+2
| | | | | | | | | | | - 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. llvm-svn: 145180
* 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
* Expose relocation accessors through the libObject C API.Owen Anderson2011-10-271-0/+10
| | | | llvm-svn: 143109
* Add relocation iterators to the libObject C API.Owen Anderson2011-10-271-0/+20
| | | | llvm-svn: 143107
OpenPOWER on IntegriCloud