summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
Commit message (Collapse)AuthorAgeFilesLines
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-011-4/+4
| | | | | | | | | | | | | | | | We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46290 llvm-svn: 331272
* [LLVM-C] Add DIBuilder bindings to create import declarationsRobert Widmann2018-04-281-0/+66
| | | | | | | | | | | | | | Summary: Add bindings to create import declarations for modules, functions, types, and other entities. This wraps the conveniences available in the existing DIBuilder API, but these seem C++-specific. Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46167 llvm-svn: 331123
* [LLVM-C] Miscellaneous Cleanups in DIBuilder BindingsRobert Widmann2018-04-281-33/+42
| | | | | | | | | | | | | | | | Summary: * rL328953 does not include bindings for LLVMDIBuilderCreateClassType and LLVMDIBuilderCreateBitFieldMemberType despite declaring their prototypes. Provide these bindings now. * Switch to more precise types with specific numeric limits matching the DIBuilder's C++ API. Reviewers: harlanhaskins, whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46168 llvm-svn: 331114
* Fix Wdocumentation warnings. NFCI.Simon Pilgrim2018-04-241-3/+0
| | | | llvm-svn: 330716
* InstCombine: Fix layering by not including Scalar.h in InstCombineDavid Blaikie2018-04-241-0/+43
| | | | | | | | (notionally Scalar.h is part of libLLVMScalarOpts, so it shouldn't be included by InstCombine which doesn't/shouldn't need to depend on ScalarOpts) llvm-svn: 330669
* [AggressiveInstCombine] Add aggressive inst combiner to the LLVM C API.Craig Topper2018-04-242-0/+4
| | | | | | I just tried to copy what was done for regular InstCombine. Hopefully I didn't miss anything. llvm-svn: 330668
* [LLVM-C] DIBuilder Bindings For Variable ExpressionsRobert Widmann2018-04-231-0/+106
| | | | | | | | | | | | | | Summary: Add DIBuilder bindings for (global) variable expressions, variable value expressions, and debug value intrinsic insertion. Reviewers: harlanhaskins, deadalnix, whitequark Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45979 llvm-svn: 330661
* [LLVM-C] DIBuilderBindings for Subrange and ArraysRobert Widmann2018-04-231-0/+30
| | | | | | | | | | | | | | Summary: Move Go bindings for subranges and DINode arrays. Reviewers: harlanhaskins, whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45933 llvm-svn: 330594
* [LLVM-C] Finish Up Scope BindingsRobert Widmann2018-04-231-7/+73
| | | | | | | | | | | | | | Summary: Adds bindings for Module and NameSpace scopes and LLVMDIBuilderCreateForwardDecl, a counterpart to LLVMDIBuilderCreateReplaceableCompositeType. Reviewers: harlanhaskins, whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45934 llvm-svn: 330591
* [LLVM-C] Add DIBuilder Bindings For Variable CreationRobert Widmann2018-04-221-0/+74
| | | | | | | | | | | | | | Summary: Wrap LLVMDIBuilderCreateAutoVariable, LLVMDIBuilderCreateParameterVariable, LLVMDIBuilderCreateExpression, and move and correct LLVMDIBuilderInsertDeclareBefore and LLVMDIBuilderInsertDeclareAtEnd from the Go bindings to the C bindings. Reviewers: harlanhaskins, whitequark, deadalnix Reviewed By: harlanhaskins, whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45928 llvm-svn: 330555
* [LLVM-C] Add LLVMGetHostCPU{Name,Features}.whitequark2018-04-111-0/+8
| | | | | | | | | | | | | | Without these functions it's hard to create a TargetMachine for Orc JIT that creates efficient native code. It's not sufficient to just expose LLVMGetHostCPUName(), because for some CPUs there's fewer features actually available than the CPU name indicates (e.g. AVX might be missing on some CPUs identified as Skylake). Differential Revision: https://reviews.llvm.org/D44861 llvm-svn: 329856
* [LLVM-C] Move DIBuilder Bindings For Block ScopesRobert Widmann2018-04-071-0/+64
| | | | | | | | | | | | | | Summary: Move LLVMDIBuilderCreateFunction , LLVMDIBuilderCreateLexicalBlock, and LLVMDIBuilderCreateLexicalBlockFile from Go to LLVM-C. Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark, harlanhaskins Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45352 llvm-svn: 329488
* [LLVM-C] Fill Out LLVMCallConvRobert Widmann2018-04-061-7/+42
| | | | | | | | | | | | | | Summary: Bring LLVMCallConv up to date with latest [[ http://llvm.org/doxygen/CallingConv_8h_source.html | CallConv ]] Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45347 llvm-svn: 329373
* [LLVM-C] Audit Inline Assembly APIs for ConsistencyRobert Widmann2018-04-061-2/+37
| | | | | | | | | | | | | | | | | | Summary: - Add a missing getter for module-level inline assembly - Add a missing append function for module-level inline assembly - Deprecate LLVMSetModuleInlineAsm and replace it with LLVMSetModuleInlineAsm2 which takes an explicit length parameter - Deprecate LLVMConstInlineAsm and replace it with LLVMGetInlineAsm, a function that allows passing a dialect and is not mis-classified as a constant operation Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45346 llvm-svn: 329369
* Assume existence of inttypes.h and stdint.h in DataTypes.h.Nico Weber2018-04-021-45/+0
| | | | | | | | | | | | | These should exist in all toolchains LLVM supports nowadays. Enables making DataTypes.h a regular header instead of a .h.cmake file and allows deleting a bunch of cmake goop (which should also speed up cmake configure time a bit). All the code this removes is 9+ years old. https://reviews.llvm.org/D45155 llvm-svn: 328970
* Wdocumentation fix. NFCI.Simon Pilgrim2018-04-021-5/+5
| | | | llvm-svn: 328964
* Wdocumentation fixes. NFCI.Simon Pilgrim2018-04-021-19/+28
| | | | llvm-svn: 328963
* Add C API bindings for DIBuilder 'Type' APIsHarlan Haskins2018-04-021-0/+324
| | | | | | | | | | This patch adds a set of unstable C API bindings to the DIBuilder interface for creating structure, function, and aggregate types. This patch also removes the existing implementations of these functions from the Go bindings and updates the Go API to fit the new C APIs. llvm-svn: 328953
* [LLVM-C] Finish exception instruction bindings - Round 2Robert Widmann2018-03-301-6/+73
| | | | | | | | | | | | | | | | | | | Summary: Previous revision caused a leak in the echo test that got caught by the ASAN bots because of missing free of the handlers array and was reverted in r328759. Resubmitting the patch with that correction. Add support for cleanupret, catchret, catchpad, cleanuppad and catchswitch and their associated accessors. Test is modified from SimplifyCFG because it contains many diverse usages of these instructions. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: llvm-commits, vlad.tsyrklevich Differential Revision: https://reviews.llvm.org/D45100 llvm-svn: 328883
* Revert "[LLVM-C] Finish exception instruction bindings"Vlad Tsyrklevich2018-03-301-73/+6
| | | | | | This reverts commit r328759. It was causing LSan failures on sanitizer-x86_64-linux-bootstrap llvm-svn: 328858
* llvm-c: Split Utils out of Scalar.hDavid Blaikie2018-03-292-6/+50
| | | | | | | To fix layering (so that Scalar.h, a libScalarOpts header, isn't included from Utils - which libScalarOpts depends on). llvm-svn: 328839
* [LLVM-C] Finish exception instruction bindingsRobert Widmann2018-03-291-6/+73
| | | | | | | | | | | | | | | | | Summary: Add support for cleanupret, catchret, catchpad, cleanuppad and catchswitch and their associated accessors. Test is modified from SimplifyCFG because it contains many diverse usages of these instructions. Reviewers: whitequark, deadalnix, echristo Reviewed By: echristo Subscribers: llvm-commits, harlanhaskins Differential Revision: https://reviews.llvm.org/D44496 llvm-svn: 328759
* Split Disassembler.h in two to fix dependenciesDavid Blaikie2018-03-292-146/+161
| | | | | | | | | | | | | | Support includes this header for the typedefs - but logically it's part of the MC/Disassembler library that implements the functions. Split the header so as not to create a circular dependency. This is another case where probably inverting the llvm-c implementation might be best (rather than core llvm libraries implementing the parts of llvm-c - instead llvm-c could be its own library, depending on all the parts of LLVM's core libraries to then implement llvm-c on top of them... if that makes sense) llvm-svn: 328744
* Reapply Support layering fixes.David Blaikie2018-03-214-3/+138
| | | | | | | | | | | | | | | | | | | | Compiler.h is used by Demangle (which Support depends on) - so sink it into Demangle to avoid a circular dependency DataTypes.h is used by llvm-c (which Support depends on) - so sink it into llvm-c. DataTypes.h could probably be fixed the other way - making llvm-c depend on Support instead of Support depending on llvm-c - if anyone feels that's the better option, happy to work with them on that. I /think/ this'll address the layering issues that previous attempts to commit this have triggered in the Modules buildbot, but I haven't been able to reproduce that build so can't say for sure. If anyone's having trouble with this - it might be worth taking a look to see if there's a quick fix/something small I missed rather than revert, but no worries. llvm-svn: 328123
* Revert "Move DataTypes.h from Support to llvm-c to fix layering."Jonas Devlieghere2018-03-211-135/+0
| | | | | | | | This reverts r328065. I missed this one in r328085 and the bots were still failing. llvm-svn: 328095
* Revert layering changesJonas Devlieghere2018-03-211-1/+1
| | | | | | | | | | | | This reverts: r328072 "Move Compiler.h from Support to Demangler to fix layering." r328073 "Fix the actual user of DataTypes.h in llvm-c to avoid the circular dependency" Failing bots: http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/ http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/ llvm-svn: 328085
* Fix the actual user of DataTypes.h in llvm-c to avoid the circular dependencyDavid Blaikie2018-03-211-1/+1
| | | | | | (follow-up to r328065) llvm-svn: 328073
* Move DataTypes.h from Support to llvm-c to fix layering.David Blaikie2018-03-211-0/+135
| | | | | | | | | | | Support depends on llvm-c (a few typedefs, macros, etc - Types.h, Disassembler.h, and TargetMachine.h. This could be done the other way - those macros/typedefs/etc could be moved into Support and used from llvm-c instead. If someone feels that's a better direction to go, happy to discuss it/try it out/etc. llvm-svn: 328065
* Revert "Fix layering between llvm-c and Support by factoring out some ↵Jonas Devlieghere2018-03-201-1/+37
| | | | | | | | | | | typedefs into Support" This reverts r327940 because it fails on several GreenDragon bots. http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/ http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/ llvm-svn: 327968
* Fix layering between llvm-c and Support by factoring out some typedefs into ↵David Blaikie2018-03-201-37/+1
| | | | | | | | | | Support llvm-c depends on Support, but Support (TargetRegistry) uses some of llvm-c's typedefs. Move those into a Support header to be used from both llvm-c and Support. llvm-svn: 327940
* [ORC] Re-apply r327566 with a fix for test-global-ctors.ll.Lang Hames2018-03-151-32/+2
| | | | | | Also clang-formats the patch, which I should have done the first time around. llvm-svn: 327594
* Revert "[ORC] Switch from shared_ptr to unique_ptr for addModule methods."Reid Kleckner2018-03-141-2/+30
| | | | | | | | | | | | | This reverts commit r327566, it breaks test/ExecutionEngine/OrcMCJIT/test-global-ctors.ll. The test doesn't crash with a stack trace, unfortunately. It merely returns 1 as the exit code. ASan didn't produce a report, and I reproduced this on my Linux machine and Windows box. llvm-svn: 327576
* [ORC] Switch from shared_ptr to unique_ptr for addModule methods.Lang Hames2018-03-141-30/+2
| | | | | | | Layer implementations typically mutate module state, and this is better reflected by having layers own the Module they are operating on. llvm-svn: 327566
* [LLVM-C] [bindings/go] Add C and Golang bindings for COMDATReid Kleckner2018-03-142-0/+80
| | | | | | | | Patch by Ben Clayton Differential Revision: https://reviews.llvm.org/D44086 llvm-svn: 327551
* [LLVM-C] Redo unnamed_address attribute bindingsRobert Widmann2018-03-141-0/+11
| | | | | | | | | | | | | | | | | | | Summary: The old bindings should have used an enum instead of a boolean. This deprecates LLVMHasUnnamedAddr and LLVMSetUnnamedAddr , replacing them with LLVMGetUnnamedAddress and LLVMSetUnnamedAddress respectively that do. Though it is unlikely LLVM will gain more supported global value linker hints, the new API can scale to accommodate this. Reviewers: deadalnix, whitequark Reviewed By: whitequark Subscribers: llvm-commits, harlanhaskins Differential Revision: https://reviews.llvm.org/D43448 llvm-svn: 327479
* [ThinLTO] Added a couple of C LTO API interfaces to control the cache policy.Ekaterina Romanova2018-03-021-1/+23
| | | | | | | | | | - thinlto_codegen_set_cache_size_bytes to control the absolute size of cache directory. - thinlto_codegen_set_cache_size_files the size and amount of files in cache directory. These functions have been supported in C++ LTO API for a long time, but were absent in C LTO API. Differential Revision: https://reviews.llvm.org/D42446 llvm-svn: 326537
* Allow 0 to be a valid value pruning interval in C LTO API. Value 0 will ↵Ekaterina Romanova2018-02-151-1/+1
| | | | | | cause garbage collector to run. This matches the behavior in C++ LTO API. llvm-svn: 325303
* [ORC] Remove Layer handles from the layer concept.Lang Hames2018-02-091-1/+1
| | | | | | | | | Handles were returned by addModule and used as keys for removeModule, findSymbolIn, and emitAndFinalize. Their job is now subsumed by VModuleKeys, which simplify resource management by providing a consistent handle across all layers. llvm-svn: 324700
* [LLVM-C] Add Accessors For A Module's Source File NameRobert Widmann2018-01-301-0/+21
| | | | | | | | | | | | | | Summary: Also unblocks some cleanup in the echo-test. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: harlanhaskins, llvm-commits Differential Revision: https://reviews.llvm.org/D42618 llvm-svn: 323819
* [NFC] fix trivial typos in comments and documentsHiroshi Inoue2018-01-261-1/+1
| | | | | | "in in" -> "in", "on on" -> "on" etc. llvm-svn: 323508
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-01-232-2/+2
| | | | | | "the the" -> "the" llvm-svn: 323176
* Debug Info: Support DW_AT_calling_convention on composite types.Adrian Prantl2018-01-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described at http://www.dwarfstd.org/ShowIssue.php?issue=141215.1 This allows a consumer to understand whether a composite data type is trivially copyable and thus should be passed by value instead of by reference. The canonical example is being able to distinguish the following two types: // S is not trivially copyable because of the explicit destructor. struct S { ~S() {} }; // T is a POD type. struct T { ~T() = default; }; This patch adds two new (DI)flags to LLVM metadata: TypePassByValue and TypePassByReference. <rdar://problem/36034922> Differential Revision: https://reviews.llvm.org/D41743 llvm-svn: 321844
* [ThinLTO][CachePruning] explicitly disable pruningBen Dunbobbin2017-12-221-4/+4
| | | | | | | | | | | In https://reviews.llvm.org/rL321077 and https://reviews.llvm.org/D41231 I fixed a regression in the c-api which prevented the pruning from being *effectively* disabled. However this approach, helpfully recommended by @labath, is cleaner. It is also nice to remove the weasel words about effectively disabling from the api comments. Differential Revision: https://reviews.llvm.org/D41497 llvm-svn: 321376
* [ThinLTO][C-API] Correct api commentsBen Dunbobbin2017-12-191-9/+9
| | | | | | | | | | | | Negative values never disabled the pruning - they simply set high values for the pruning interval. The behaviour now is that negative values set the maximum pruning interval (which appears to have been the intention from the start) see https://reviews.llvm.org/D41231. I have adjusted the comments to reflect this, removed any inaccurate statements, and corrected any typos I spotted in the English. Differential Revision: https://reviews.llvm.org/D41279 llvm-svn: 321078
* Use code voice for DIBuilder in LLVM C APIHarlan Haskins2017-11-041-2/+2
| | | | | | (This is a test commit) llvm-svn: 317422
* Clean up comments in include/llvm-c/DebugInfo.hAdrian Prantl2017-11-021-59/+84
| | | | | | | | Patch by Harlan Haskins! Differential Revision: https://reviews.llvm.org/D39568 llvm-svn: 317271
* Add missing header guards.Adrian Prantl2017-11-021-0/+5
| | | | llvm-svn: 317267
* llvm-c/DebugInfo.h: Fix warning. [-Wdocumentation]NAKAMURA Takumi2017-11-021-1/+1
| | | | llvm-svn: 317191
* [LLVM-C] Expose functions to create debug locations via DIBuilder.whitequark2017-11-011-0/+202
| | | | | | | | | | | | | | These include: * Several functions for creating an LLVMDIBuilder, * LLVMDIBuilderCreateCompileUnit, * LLVMDIBuilderCreateFile, * LLVMDIBuilderCreateDebugLocation. Patch by Harlan Haskins. Differential Revision: https://reviews.llvm.org/D32368 llvm-svn: 317135
* [SimplifyCFG] use pass options and remove the latesimplifycfg passSanjay Patel2017-10-281-3/+0
| | | | | | | | | | | | | | | | | This is no-functional-change-intended. This is repackaging the functionality of D30333 (defer switch-to-lookup-tables) and D35411 (defer folding unconditional branches) with pass parameters rather than a named "latesimplifycfg" pass. Now that we have individual options to control the functionality, we could decouple when these fire (but that's an independent patch if desired). The next planned step would be to add another option bit to disable the sinking transform mentioned in D38566. This should also make it clear that the new pass manager needs to be updated to limit simplifycfg in the same way as the old pass manager. Differential Revision: https://reviews.llvm.org/D38631 llvm-svn: 316835
OpenPOWER on IntegriCloud