Add llvm-c-test tool for testing llvm-c
authorAnders Waldenborg <anders@0x63.nu>
Wed, 23 Oct 2013 08:10:20 +0000 (08:10 +0000)
committerAnders Waldenborg <anders@0x63.nu>
Wed, 23 Oct 2013 08:10:20 +0000 (08:10 +0000)
commitb932c6695590dc272dc0f40f6dc2e3f881c0859b
tree769fd199b96e1a09810234e73f83d4c563e0d5b5
parent993f1f38fdda2a38e7b3aac0611162796ce92ad1
Add llvm-c-test tool for testing llvm-c

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
19 files changed:
llvm/test/Bindings/llvm-c/calc.test [new file with mode: 0644]
llvm/test/Bindings/llvm-c/disassemble.test [new file with mode: 0644]
llvm/test/Bindings/llvm-c/functions.ll [new file with mode: 0644]
llvm/test/Bindings/llvm-c/globals.ll [new file with mode: 0644]
llvm/test/Bindings/llvm-c/lit.local.cfg [new file with mode: 0644]
llvm/test/lit.cfg
llvm/tools/CMakeLists.txt
llvm/tools/Makefile
llvm/tools/llvm-c-test/CMakeLists.txt [new file with mode: 0644]
llvm/tools/llvm-c-test/Makefile [new file with mode: 0644]
llvm/tools/llvm-c-test/calc.c [new file with mode: 0644]
llvm/tools/llvm-c-test/disassemble.c [new file with mode: 0644]
llvm/tools/llvm-c-test/helpers.c [new file with mode: 0644]
llvm/tools/llvm-c-test/include-all.c [new file with mode: 0644]
llvm/tools/llvm-c-test/llvm-c-test.h [new file with mode: 0644]
llvm/tools/llvm-c-test/main.c [new file with mode: 0644]
llvm/tools/llvm-c-test/module.c [new file with mode: 0644]
llvm/tools/llvm-c-test/object.c [new file with mode: 0644]
llvm/tools/llvm-c-test/targets.c [new file with mode: 0644]