aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-c-test/module.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-05Prefix external symbols in llvm-c-test.Benjamin Kramer1-7/+7
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
2016-02-04Improve testing for the C APIAmaury Sechet1-2/+1
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
2015-12-18Deprecate a few C APIs.Rafael Espindola1-9/+25
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
2015-12-18Add a test for LLVMGetBitcodeModule.Rafael Espindola1-7/+15
llvm-svn: 255985
2013-10-25llvm-c-test: Don't leak memory buffers.Benjamin Kramer1-0/+2
Detected by valgrind. llvm-svn: 193416
2013-10-23llvm-c-test: Make them C89-compliant.NAKAMURA Takumi1-2/+4
llvm-svn: 193254
2013-10-23Add llvm-c-test tool for testing llvm-cAnders Waldenborg1-0/+112
This provides rudimentary testing of the llvm-c api. The following commands are implemented: * --module-dump Read bytecode from stdin - print ir * --module-list-functions Read bytecode from stdin - list summary of functions * --module-list-globals Read bytecode from stdin - list summary of globals * --targets-list List available targets * --object-list-sections Read object file from stdin - list sections * --object-list-symbols Read object file from stdin - list symbols (like nm) * --disassemble Read lines of triple, hex ascii machine code from stdin - print disassembly * --calc Read lines of name, rpn from stdin - print generated module ir Differential-Revision: http://llvm-reviews.chandlerc.com/D1776 llvm-svn: 193233