summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bindings
Commit message (Collapse)AuthorAgeFilesLines
...
* Add writeonly IR attributeNicolai Haehnle2016-07-042-2/+2
| | | | | | | | | | | | | | | | | Summary: This complements the earlier addition of IntrWriteMem and IntrWriteArgMem LLVM intrinsic properties, see D18291. Also start using the attribute for memset, memcpy, and memmove intrinsics, and remove their special-casing in BasicAliasAnalysis. Reviewers: reames, joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D18714 llvm-svn: 274485
* [OCaml] Add functions for accessing metadata nodes.Peter Zotov2016-06-221-0/+1
| | | | | | | | Patch by Xinyu Zhuang. Differential Revision: http://reviews.llvm.org/D19309 llvm-svn: 273370
* Add support for callsite in the new C API for attributesAmaury Sechet2016-06-151-5/+5
| | | | | | | | | | | | Summary: The second consumer of attributes. Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D21266 llvm-svn: 272754
* Make sure we have a Add/Remove/Has function for various thing that can have ↵Amaury Sechet2016-06-121-4/+5
| | | | | | | | | | | | | | attribute. Summary: This also deprecated the get attribute function familly. Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight Subscribers: axw, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19181 llvm-svn: 272504
* [OCaml] Update core test and re-enable testingJeroen Ketema2016-05-102-32/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D19828 llvm-svn: 269040
* [OCaml] Expose the LLVM diagnostic handlerJeroen Ketema2016-04-104-1/+60
| | | | | | Differential Revision: http://reviews.llvm.org/D18891 llvm-svn: 265897
* [llvm-c] Expose LLVMContextGetDiagnostic{Handler,Context}Jeroen Ketema2016-04-082-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D18820 llvm-svn: 265773
* [OCaml] Reinstate data_layoutJeroen Ketema2016-04-011-0/+1
| | | | | | | | | | | | Expose LLVMCreateTargetMachineData as data_layout. As r263530 did for go. From that commit: "LLVMGetTargetDataLayout was removed from the C API, and then TargetMachine.TargetData was removed. Later, LLVMCreateTargetMachineData was added to the C API" Differential Revision: http://reviews.llvm.org/D18677 llvm-svn: 265115
* Silence warnings in OCaml bindingsJeroen Ketema2016-03-311-4/+1
| | | | | | | | | * LLVMDisposeMessage lives in llvm-c/Core.h, include this file where necessary * LLVMAddTargetData has been removed, follow suit in the bindings Differential Revision: http://reviews.llvm.org/D18633 llvm-svn: 265001
* Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API.Mehdi Amini2016-03-191-0/+10
| | | | | | | | | | | | | Summary: Also expose getters and setters in the C API, so that the change can be tested. Reviewers: nhaehnle, axw, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18260 From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> llvm-svn: 263886
* Add echo test for constant data arrays in the LLVM C APIAmaury Sechet2016-03-131-0/+2
| | | | llvm-svn: 263350
* Add support for invoke/landingpad/resume in C API testAmaury Sechet2016-02-181-0/+82
| | | | | | | | | | | | Summary: As per title. There was a lot of part missing in the C API, so I had to extend the invoke and landingpad API. Reviewers: echristo, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17359 llvm-svn: 261254
* Add support for memory operations (load/store/gep) in C API echo testAmaury Sechet2016-02-171-0/+37
| | | | | | | | | | | | Summary: As per title. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17245 llvm-svn: 261174
* Add support for global variables in the C API echo testAmaury Sechet2016-02-171-0/+9
| | | | | | | | | | | | Summary: As per title Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17249 llvm-svn: 261164
* Make sure the functions' range is empty before going through it in the LLVM ↵Amaury Sechet2016-02-161-0/+3
| | | | | | C API test llvm-svn: 260947
* Restore the capability to manipulate datalayout from the C APIAmaury Sechet2016-02-161-0/+3
| | | | | | | | | | | | | | | | | Summary: This consist in variosu addition to the C API: LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M); void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL); LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T); Reviewers: joker.eph, Wallbraker, echristo Subscribers: axw Differential Revision: http://reviews.llvm.org/D17255 llvm-svn: 260936
* Remove LLVMGetTargetMachineData leftovers.Benjamin Kramer2016-02-121-1/+0
| | | | llvm-svn: 260720
* Add support for phi nodes in the LLVM C API testAmaury Sechet2016-02-111-0/+16
| | | | | | | | | | | | Summary: This required to add binding to Instruction::removeFromParent so that instruction can be forward declared and then moved at the right place. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17057 llvm-svn: 260597
* Add support for struct in C API testAmaury Sechet2016-02-101-1/+11
| | | | | | | | | | | | Summary: As per title. This also include extra support for insertvalue and extracvalue. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17055 llvm-svn: 260335
* Add icmp and conditional branches in the C API echo test.Amaury Sechet2016-02-091-2/+32
| | | | | | | | | | | | | | | Summary: Improving coverage. Depends on D16912 . Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16937 llvm-svn: 260321
* Improve the C API echo test tool to emit basic block is the right order.Amaury Sechet2016-02-091-0/+8
| | | | | | | | | | | | Summary: As per title. Also add a facility method to get the name of a basic block from the C API. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16912 llvm-svn: 260309
* Make the OCaml tests temporarily unsupported until they can be updated.Eric Christopher2016-02-051-0/+3
| | | | llvm-svn: 259954
* Fix echo.ll test failing due to DOS line endingsReid Kleckner2016-02-051-1/+1
| | | | llvm-svn: 259896
* Add various binary operations in the LLVM C API echo testAmaury Sechet2016-02-051-3/+15
| | | | | | | | | | | | Summary: This diff increase the tested surface of the C API. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16910 llvm-svn: 259863
* Improve testing for the C APIAmaury Sechet2016-02-041-0/+32
| | | | | | | | | | | | | | | | | | | Summary: This basically add an echo test case in C. The support is limited right now, but full support would just be too much to review at once. The echo test case simply get a module as input and try to output the same exact module. This allow to check the both reading and writing API are working as expected. I want to improve this test over time to support more and more of the API, in order to improve coverage (coverage is quite poor right now). Test Plan: Run the test. Reviewers: chandlerc, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10725 llvm-svn: 259844
* Deprecate a few C APIs.Rafael Espindola2015-12-181-0/+6
| | | | | | | | | | | | | This deprecates: * LLVMParseBitcode * LLVMParseBitcodeInContext * LLVMGetBitcodeModuleInContext * LLVMGetBitcodeModule They are replaced with the functions with a 2 suffix which do not record a diagnostic. llvm-svn: 256065
* Fix error handling in LLVMGetBitcodeModuleInContext.Rafael Espindola2015-12-181-0/+1
| | | | | | It was not setting OutMessage. llvm-svn: 255998
* Add a test for LLVMGetBitcodeModule.Rafael Espindola2015-12-181-1/+10
| | | | llvm-svn: 255985
* Change linkInModule to take a std::unique_ptr.Rafael Espindola2015-12-161-6/+4
| | | | | | | Passing in a std::unique_ptr should help find errors when the module is used after being linked into another module. llvm-svn: 255842
* Add InaccessibleMemOnly and inaccessibleMemOrArgMemOnly attributesVaivaswatha Nagaraj2015-12-162-1/+1
| | | | | | | | | | | | | | | | | | Summary: This patch introduces two new function attributes InaccessibleMemOnly: This attribute indicates that the function may only access memory that is not accessible by the program/IR being compiled. This is a weaker form of ReadNone. inaccessibleMemOrArgMemOnly: This attribute indicates that the function may only access memory that is either not accessible by the program/IR being compiled, or is pointed to by its pointer arguments. This is a weaker form of ArgMemOnly Test cases have been updated. This revision uses this (https://github.com/llvm-mirror/llvm/commit/d001932f3a8aa1ebd1555162fdce365f011bc292) as reference. Reviewers: jmolloy, hfinkel Subscribers: reames, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D15499 llvm-svn: 255778
* Disable Go bindings test with MSan, it has tons of linker errorsReid Kleckner2015-11-191-1/+1
| | | | llvm-svn: 253525
* Add a new attribute: norecurseJames Molloy2015-11-062-1/+1
| | | | | | This attribute allows the compiler to assume that the function never recurses into itself, either directly or indirectly (transitively). This can be used among other things to demote global variables to locals. llvm-svn: 252282
* Add a way to skip the Go bindings tests even when Go is configured inChandler Carruth2015-09-101-0/+3
| | | | | | | | | | | | | CMake. The Go bindings tests in an unoptimized build take over 30 seconds for me, making it the slowest test in 'check-llvm' by a factor of two. I've only rigged this up fully to the CMake build. If someone is interested in rigging it up to the autoconf build, they're welcome to do so. llvm-svn: 247243
* [OCaml] Do not use -warn-error in tests.Peter Zotov2015-07-1714-28/+28
| | | | | | | | | | This -warn-error flag invariably gets into release tarballs and breaks builds on distributions that run tests as a part of release process. The OCaml binding tests are especially critical, since they often expose lingering toolchain bugs, and so it is replaced with -w +A (equivalent to -Wall). llvm-svn: 242550
* test: Move target dependent test in their own folder for c API testJustin Bogner2015-06-234-24/+25
| | | | | | | | | | Dissasembly tests depends on target. The problem is that it disable all tests if all targets are not compiled. This moves things around in order to get target specific code in a target specific folder. Patch by Amaury Sechet. Thanks! llvm-svn: 240380
* IR: Give 'DI' prefix to debug info metadataDuncan P. N. Exon Smith2015-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. llvm-svn: 236120
* DebugInfo: Move new hierarchy into placeDuncan P. N. Exon Smith2015-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the specialized metadata nodes for the new debug info hierarchy into place, finishing off PR22464. I've done bootstraps (and all that) and I'm confident this commit is NFC as far as DWARF output is concerned. Let me know if I'm wrong :). The code changes are fairly mechanical: - Bumped the "Debug Info Version". - `DIBuilder` now creates the appropriate subclass of `MDNode`. - Subclasses of DIDescriptor now expect to hold their "MD" counterparts (e.g., `DIBasicType` expects `MDBasicType`). - Deleted a ton of dead code in `AsmWriter.cpp` and `DebugInfo.cpp` for printing comments. - Big update to LangRef to describe the nodes in the new hierarchy. Feel free to make it better. Testcase changes are enormous. There's an accompanying clang commit on its way. If you have out-of-tree debug info testcases, I just broke your build. - `upgrade-specialized-nodes.sh` is attached to PR22564. I used it to update all the IR testcases. - Unfortunately I failed to find way to script the updates to CHECK lines, so I updated all of these by hand. This was fairly painful, since the old CHECKs are difficult to reason about. That's one of the benefits of the new hierarchy. This work isn't quite finished, BTW. The `DIDescriptor` subclasses are almost empty wrappers, but not quite: they still have loose casting checks (see the `RETURN_FROM_RAW()` macro). Once they're completely gutted, I'll rename the "MD" classes to "DI" and kill the wrappers. I also expect to make a few schema changes now that it's easier to reason about everything. llvm-svn: 231082
* [OCaml] Add Llvm.build_empty_phi.Peter Zotov2015-02-061-0/+9
| | | | llvm-svn: 228395
* Propagate a better error message to the C api.Rafael Espindola2015-02-031-1/+1
| | | | llvm-svn: 227934
* Use a non-fatal diag handler in the C API. FIxes PR22368.Rafael Espindola2015-02-032-0/+3
| | | | llvm-svn: 227903
* Fix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodesBjorn Steinbrink2015-01-282-0/+4
| | | | | | | | | | | | | Summary: MetadataAsValue uses a canonical format that strips the MDNode if it contains only a single constant value. This triggers an assertion when trying to cast the value to a MDNode. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7165 llvm-svn: 227319
* IR: Move MDLocation into placeDuncan P. N. Exon Smith2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | This commit moves `MDLocation`, finishing off PR21433. There's an accompanying clang commit for frontend testcases. I'll attach the testcase upgrade script I used to PR21433 to help out-of-tree frontends/backends. This changes the schema for `DebugLoc` and `DILocation` from: !{i32 3, i32 7, !7, !8} to: !MDLocation(line: 3, column: 7, scope: !7, inlinedAt: !8) Note that empty fields (line/column: 0 and inlinedAt: null) don't get printed by the assembly writer. llvm-svn: 226048
* Disable Go bindings test under UBSan.Alexey Samsonov2015-01-091-1/+1
| | | | llvm-svn: 225557
* [OCaml] Fix bitrot in tests.Peter Zotov2014-12-301-2/+2
| | | | llvm-svn: 224979
* [OCaml] PR21901: Update tests.Peter Zotov2014-12-241-2/+2
| | | | | | This finishes the fix partially applied by r224782. llvm-svn: 224802
* [OCaml] Expose Llvm_executionengine.get_{global_value,function}_address.Peter Zotov2014-12-241-2/+9
| | | | | | | | | Patch by Ramkumar Ramachandra <artagnon@gmail.com>. Also remove Llvm_executionengine.get_pointer_to_global, as it is actually deprecated and didn't appear in a stable release. llvm-svn: 224801
* Finish removing DestroySource.Rafael Espindola2014-12-231-1/+1
| | | | | | Fixes pr21901. llvm-svn: 224782
* IR: Make metadata typeless in assemblyDuncan P. N. Exon Smith2014-12-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that `Metadata` is typeless, reflect that in the assembly. These are the matching assembly changes for the metadata/value split in r223802. - Only use the `metadata` type when referencing metadata from a call intrinsic -- i.e., only when it's used as a `Value`. - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode` when referencing it from call intrinsics. So, assembly like this: define @foo(i32 %v) { call void @llvm.foo(metadata !{i32 %v}, metadata !0) call void @llvm.foo(metadata !{i32 7}, metadata !0) call void @llvm.foo(metadata !1, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{metadata !3}, metadata !0) ret void, !bar !2 } !0 = metadata !{metadata !2} !1 = metadata !{i32* @global} !2 = metadata !{metadata !3} !3 = metadata !{} turns into this: define @foo(i32 %v) { call void @llvm.foo(metadata i32 %v, metadata !0) call void @llvm.foo(metadata i32 7, metadata !0) call void @llvm.foo(metadata i32* @global, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{!3}, metadata !0) ret void, !bar !2 } !0 = !{!2} !1 = !{i32* @global} !2 = !{!3} !3 = !{} I wrote an upgrade script that handled almost all of the tests in llvm and many of the tests in cfe (even handling many `CHECK` lines). I've attached it (or will attach it in a moment if you're speedy) to PR21532 to help everyone update their out-of-tree testcases. This is part of PR21532. llvm-svn: 224257
* [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.Peter Zotov2014-12-011-0/+21
| | | | | | | This way most code won't link this (substantially large) library, if compiled statically with LLVM. llvm-svn: 223072
* [OCaml] [cmake] Add CMake buildsystem for OCaml.Peter Zotov2014-12-011-1/+1
| | | | | | Closes PR15325. llvm-svn: 223071
OpenPOWER on IntegriCloud