Commit Graph

5 Commits

Author SHA1 Message Date
Bradley Smith 7a77075530 Extend C disassembler API to allow specifying target features
llvm-svn: 218682
2014-09-30 16:31:40 +00:00
Bjorn Steinbrink 5a121b2ef5 Restore the ability to check if LLVMCreateObjectFile was successful
Summary:
Until r216870 LLVMCreateObjectFile returned nullptr in case of an error,
so callers could check if the call was successful. Now, it always
returns an OwningBinary wrapped as an LLVMObjectFileRef, so callers
can't check if the call was successul.

This results in a segfault running e.g.

 llvm-c-test --object-list-sections < /dev/null

So the old behaviour should be restored.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5143

llvm-svn: 217279
2014-09-05 21:22:09 +00:00
Alp Toker d3d017cf00 Reduce verbiage of lit.local.cfg files
We can just split targets_to_build in one place and make it immutable.

llvm-svn: 210496
2014-06-09 22:42:55 +00:00
Anders Waldenborg 49416cf126 Fix check for supported targets in llvm-c lit.local.cfg
llvm-svn: 193235
2013-10-23 08:47:52 +00:00
Anders Waldenborg b932c66955 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
2013-10-23 08:10:20 +00:00