summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-c-test
Commit message (Collapse)AuthorAgeFilesLines
...
* fix typos in comments and error messges; NFCHiroshi Inoue2017-07-131-4/+4
| | | | llvm-svn: 307885
* Spelling mistakes in comments. NFCI.Simon Pilgrim2017-03-301-1/+1
| | | | | | Based on corrections mentioned in patch for clang for PR27635 llvm-svn: 299072
* Fix "isn't a prototype" warningVitaly Buka2016-11-161-2/+2
| | | | llvm-svn: 287161
* Fix build break when the host C compiler is C89.Richard Smith2016-11-161-3/+5
| | | | llvm-svn: 287075
* [C API] Prevent nullptr dereferences in C API for counting attributes.Amaury Sechet2016-11-154-0/+84
| | | | | | | | See https://reviews.llvm.org/D26392 Patch by @maleadt llvm-svn: 287044
* Add support for callsite in the new C API for attributesAmaury Sechet2016-06-151-0/+16
| | | | | | | | | | | | 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-1/+16
| | | | | | | | | | | | | | 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
* [llvm-c] Expose LLVMContextGetDiagnostic{Handler,Context}Jeroen Ketema2016-04-085-10/+108
| | | | | | Differential Revision: http://reviews.llvm.org/D18820 llvm-svn: 265773
* Do some refactoring in the LLVM C API echo test to remove duplication. NFCAmaury Sechet2016-04-071-70/+85
| | | | llvm-svn: 265641
* [llvm-c] Add LLVMGetValueKind.Peter Zotov2016-04-061-53/+69
| | | | | | | | Patch by Nicole Mazzuca <npmazzuca@gmail.com>. Differential Revision: http://reviews.llvm.org/D18729 llvm-svn: 265608
* Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining ↵Duncan P. N. Exon Smith2016-04-052-29/+7
| | | | | | | | | | files; other minor fixes." This reverts commit r265454 since it broke the build. E.g.: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/22413/ llvm-svn: 265459
* Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; ↵Eugene Zelenko2016-04-052-7/+29
| | | | | | | | | | | | other minor fixes. Some Include What You Use suggestions were used too. Use anonymous namespaces in source files. Differential revision: http://reviews.llvm.org/D18778 llvm-svn: 265454
* [llvm-c] Expose LLVM{Get,Set}ModuleIdentifierPeter Zotov2016-04-051-2/+11
| | | | | | | | Patch by Nicole Mazzuca <npmazzuca@gmail.com>. Differential Revision: http://reviews.llvm.org/D18736 llvm-svn: 265394
* Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API.Mehdi Amini2016-03-191-0/+11
| | | | | | | | | | | | | 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/+10
| | | | llvm-svn: 263350
* Add support for invoke/landingpad/resume in C API testAmaury Sechet2016-02-181-1/+35
| | | | | | | | | | | | 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 upport for bitcast in the C API echo testAmaury Sechet2016-02-171-1/+18
| | | | llvm-svn: 261177
* Add support for memory operations (load/store/gep) in C API echo testAmaury Sechet2016-02-171-0/+25
| | | | | | | | | | | | 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
* Make sure functions are generated even there is no global in the C API echo testAmaury Sechet2016-02-171-6/+10
| | | | llvm-svn: 261169
* Add support for global variables in the C API echo testAmaury Sechet2016-02-171-32/+138
| | | | | | | | | | | | 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/+5
| | | | | | C API test llvm-svn: 260947
* Do some refactoring in constant generation in the C API echo test. NFCAmaury Sechet2016-02-161-8/+10
| | | | llvm-svn: 260941
* Generate functions in 2 steps in the C API echo test. NFCAmaury Sechet2016-02-161-6/+32
| | | | llvm-svn: 260939
* Restore the capability to manipulate datalayout from the C APIAmaury Sechet2016-02-161-0/+6
| | | | | | | | | | | | | | | | | 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
* Use report_fatal_error more consistently in the C API echo testAmaury Sechet2016-02-141-73/+33
| | | | llvm-svn: 260849
* Get constant cloning out of CloneValue so it can be used when creating globals.Amaury Sechet2016-02-141-40/+47
| | | | llvm-svn: 260848
* Move clone_params aroundAmaury Sechet2016-02-141-78/+76
| | | | llvm-svn: 260846
* Add support for phi nodes in the LLVM C API testAmaury Sechet2016-02-111-18/+37
| | | | | | | | | | | | 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-77/+125
| | | | | | | | | | | | 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 binding for counting argument and find called value of call and invoke ↵Amaury Sechet2016-02-101-2/+2
| | | | | | | | | | | | instruction from the C API. Summary: As per title. This remove the need to rely on internal knowledge of call and invoke instruction to find called value and argument count. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Differential Revision: http://reviews.llvm.org/D17054 llvm-svn: 260332
* Split clone value and instruction in the echo C API testAmaury Sechet2016-02-091-73/+77
| | | | | | | | | | Summary: This is a bit of refactoring required to be able to generate instruction in forward basic block. This, for instance, is a requirement for phi in loops. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Differential Revision: http://reviews.llvm.org/D17050 llvm-svn: 260324
* Add icmp and conditional branches in the C API echo test.Amaury Sechet2016-02-091-2/+20
| | | | | | | | | | | | | | | 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
* Add C binding for AllocaInst::getAllocatedTypeAmaury Sechet2016-02-091-1/+2
| | | | | | | | | | | | | | | Summary: Comes with an awesome test. Depends on D16912 Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16942 llvm-svn: 260313
* Improve the C API echo test tool to emit basic block is the right order.Amaury Sechet2016-02-091-214/+260
| | | | | | | | | | | | 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
* Prefix external symbols in llvm-c-test.Benjamin Kramer2016-02-0510-46/+46
| | | | | | | | | This makes it less likely to clash with other stuff that might be linked in by change, e.g. ncurses exposes an external function called simply "echo", so linking ncurses statically into the binary explodes in funny ways. llvm-svn: 259882
* Add various binary operations in the LLVM C API echo testAmaury Sechet2016-02-051-0/+72
| | | | | | | | | | | | 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
* Add Support to llvm-c-test dependanciesAmaury Sechet2016-02-051-0/+1
| | | | | | | | | | | | Summary: As per title. It is required and don't get linked in in some builds. Reviewers: chapuni, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16903 llvm-svn: 259853
* Improve testing for the C APIAmaury Sechet2016-02-048-6/+488
| | | | | | | | | | | | | | | | | | | 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
* Remove autoconf supportChris Bieneman2016-01-261-29/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Deprecate a few C APIs.Rafael Espindola2015-12-183-13/+38
| | | | | | | | | | | | | 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
* Add a test for LLVMGetBitcodeModule.Rafael Espindola2015-12-183-10/+25
| | | | llvm-svn: 255985
* Reorganize the C API headers to improve build times.Eric Christopher2015-12-181-0/+1
| | | | | | | | | Type specific declarations have been moved to Type.h and error handling routines have been moved to ErrorHandling.h. Both are included in Core.h so nothing should change for projects directly including the headers, but transitive dependencies may be affected. llvm-svn: 255965
* Fix build breakage caused by memory leaks in llvm-c-testBjorn Steinbrink2015-01-281-0/+4
| | | | | | I accidently introduced those in r227319. llvm-svn: 227339
* Fix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodesBjorn Steinbrink2015-01-284-0/+48
| | | | | | | | | | | | | 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
* Have llvm-c-test only use libLLVM if libLLVM has all the right components.Chris Bieneman2014-12-181-3/+21
| | | | | | | | | | | | | | Summary: We should only have llvm-c-test use libLLVM if the library is built with the default set of components or if LLVM_DYLIB_COMPONENTS includes all the LLVM_LINK_COMPONENTS required for llvm-c-test. Making libLLVM always used causes build failures if libLLVM doesn't include all Reviewers: chapuni, ributzka Reviewed By: ributzka Subscribers: ributzka, llvm-commits Differential Revision: http://reviews.llvm.org/D6668 llvm-svn: 224541
* [CMake] llvm-c-test: Use libLLVM.so if it is available.NAKAMURA Takumi2014-11-101-0/+9
| | | | llvm-svn: 221592
* Extend C disassembler API to allow specifying target featuresBradley Smith2014-09-301-7/+13
| | | | llvm-svn: 218682
* Convert getFileOffset to getOffset and move it to its only user.Rafael Espindola2014-04-211-3/+2
| | | | | | | | | | | | | We normally don't drop functions from the C API's, but in this case I think we can: * The old implementation of getFileOffset was fairly broken * The introduction of LLVMGetSymbolFileOffset was itself a C api breaking change as it removed LLVMGetSymbolOffset. * It is an incredibly specialized use case. The only reason MCJIT needs it is because of its odd position of being a dynamic linker of .o files. llvm-svn: 206750
* Use -std=gnu99 in tools/llvm-c-test/CMakeLists.txtRafael Espindola2014-01-081-1/+1
| | | | | | | | | | | With a current mingw (gcc 4.8.1) it looks like we hit some variation of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40278 The end result is that off_t is not defined and the build fails without this patch. llvm-svn: 198749
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-1/+8
| | | | llvm-svn: 196908
OpenPOWER on IntegriCloud