summaryrefslogtreecommitdiff
path: root/tools/llvm-c-test
AgeCommit message (Collapse)Author
2017-12-16Fixed warning 'function declaration isn’t a prototype ↵Galina Kistanova
[-Werror=strict-prototypes]' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320912 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-13Remove redundant includes from tools.Michael Zolotukhin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320631 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01[LLVM-C] Expose functions to create debug locations via DIBuilder.whitequark
These include: * Several functions for creating an LLVMDIBuilder, * LLVMDIBuilderCreateCompileUnit, * LLVMDIBuilderCreateFile, * LLVMDIBuilderCreateDebugLocation. Patch by Harlan Haskins. Differential Revision: https://reviews.llvm.org/D32368 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317135 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-27[LLVM-C] Publicly expose getters of MetadataType, TokenTypewhitequark
Patch by Robert Widmann. Expose getters for MetadataType and TokenType publicly in the C API. Discovered a need for these while trying to wrap the intrinsics API. Differential Revision: https://reviews.llvm.org/D38809 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316762 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13fix typos in comments and error messges; NFCHiroshi Inoue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307885 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30Spelling mistakes in comments. NFCI.Simon Pilgrim
Based on corrections mentioned in patch for clang for PR27635 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16Fix "isn't a prototype" warningVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16Fix build break when the host C compiler is C89.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-15[C API] Prevent nullptr dereferences in C API for counting attributes.Amaury Sechet
See https://reviews.llvm.org/D26392 Patch by @maleadt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15Add support for callsite in the new C API for attributesAmaury Sechet
Summary: The second consumer of attributes. Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D21266 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272754 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-12Make sure we have a Add/Remove/Has function for various thing that can have ↵Amaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272504 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08[llvm-c] Expose LLVMContextGetDiagnostic{Handler,Context}Jeroen Ketema
Differential Revision: http://reviews.llvm.org/D18820 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-07Do some refactoring in the LLVM C API echo test to remove duplication. NFCAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06[llvm-c] Add LLVMGetValueKind.Peter Zotov
Patch by Nicole Mazzuca <npmazzuca@gmail.com>. Differential Revision: http://reviews.llvm.org/D18729 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining ↵Duncan P. N. Exon Smith
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/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; ↵Eugene Zelenko
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265454 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05[llvm-c] Expose LLVM{Get,Set}ModuleIdentifierPeter Zotov
Patch by Nicole Mazzuca <npmazzuca@gmail.com>. Differential Revision: http://reviews.llvm.org/D18736 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-19Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API.Mehdi Amini
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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-13Add echo test for constant data arrays in the LLVM C APIAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-18Add support for invoke/landingpad/resume in C API testAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17Add upport for bitcast in the C API echo testAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261177 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17Add support for memory operations (load/store/gep) in C API echo testAmaury Sechet
Summary: As per title. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17245 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17Make sure functions are generated even there is no global in the C API echo testAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261169 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-17Add support for global variables in the C API echo testAmaury Sechet
Summary: As per title Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17249 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16Make sure the functions' range is empty before going through it in the LLVM ↵Amaury Sechet
C API test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260947 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16Do some refactoring in constant generation in the C API echo test. NFCAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16Generate functions in 2 steps in the C API echo test. NFCAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260939 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16Restore the capability to manipulate datalayout from the C APIAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14Use report_fatal_error more consistently in the C API echo testAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14Get constant cloning out of CloneValue so it can be used when creating globals.Amaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14Move clone_params aroundAmaury Sechet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11Add support for phi nodes in the LLVM C API testAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260597 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10Add support for struct in C API testAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260335 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10Add binding for counting argument and find called value of call and invoke ↵Amaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09Split clone value and instruction in the echo C API testAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260324 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09Add icmp and conditional branches in the C API echo test.Amaury Sechet
Summary: Improving coverage. Depends on D16912 . Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16937 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09Add C binding for AllocaInst::getAllocatedTypeAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09Improve the C API echo test tool to emit basic block is the right order.Amaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05Prefix external symbols in llvm-c-test.Benjamin Kramer
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05Add various binary operations in the LLVM C API echo testAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05Add Support to llvm-c-test dependanciesAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259853 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04Improve testing for the C APIAmaury Sechet
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26Remove autoconf supportChris Bieneman
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258861 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Deprecate a few C APIs.Rafael Espindola
This deprecates: * LLVMParseBitcode * LLVMParseBitcodeInContext * LLVMGetBitcodeModuleInContext * LLVMGetBitcodeModule They are replaced with the functions with a 2 suffix which do not record a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Add a test for LLVMGetBitcodeModule.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255985 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18Reorganize the C API headers to improve build times.Eric Christopher
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255965 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28Fix build breakage caused by memory leaks in llvm-c-testBjorn Steinbrink
I accidently introduced those in r227319. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227339 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28Fix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodesBjorn Steinbrink
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227319 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18Have llvm-c-test only use libLLVM if libLLVM has all the right components.Chris Bieneman
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224541 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-10[CMake] llvm-c-test: Use libLLVM.so if it is available.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221592 91177308-0d34-0410-b5e6-96231b3b80d8