[PATCH] D60322: [LLVM-C] Begin to Expose A More General Binary Interface

Robert Widmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 12:38:08 PDT 2019


CodaFi added a comment.

The ObjectFile APIs seem to have rotted a bit.  There's a bunch of pitfalls when working with the thing like the fact that it goes out of its way to `move` the input buffer despite the `create` APIs taking non-owning references to the buffer in C++, accessors that no longer do anything useful (LLVMGetRelocationValueString) and inconsistent error handling routines (some functions return NULL, LLVMGetSymbolName and LLVMGetSymbolName reports a fatal error).  On top of that, it's not actually a general interface to ObjectFile - it can't handle Mach-O Universal binaries as inputs for one.

I want to re-approach these APIs from the perspective of `llvm::object::Binary` first, then specialize them for ObjectFiles, Archives, etc. The idea being to eventually grow a `Binary.h` once we can provide a more comprehensive API.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60322/new/

https://reviews.llvm.org/D60322





More information about the llvm-commits mailing list