diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-11-19 14:04:59 -0800 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-11-19 16:30:37 -0800 |
commit | bffdee8ef379126de3f2581214d89c1b29f440b7 (patch) | |
tree | 141c880a7d81cb918e21d8612bc0bb0dd4d8b4a9 /llvm/include/llvm-c | |
parent | 1b387484b9b38a4a1e98a9d22a9a26065b0d184e (diff) | |
download | bcm5719-llvm-bffdee8ef379126de3f2581214d89c1b29f440b7.tar.gz bcm5719-llvm-bffdee8ef379126de3f2581214d89c1b29f440b7.zip |
[LTO][Legacy] Add API for passing LLVM options separately
In order to correctly pass options to LLVM, including options containing
spaces which are used as delimiters for multiple options in
lto_codegen_debug_options, add a new API:
lto_codegen_debug_options_array.
Unfortunately, tools/lto has no testing infrastructure yet, so there are
no tests associated with this patch.
Differential Revision: https://reviews.llvm.org/D70463
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r-- | llvm/include/llvm-c/lto.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h index 0c6ce673162..97a8f482332 100644 --- a/llvm/include/llvm-c/lto.h +++ b/llvm/include/llvm-c/lto.h @@ -46,7 +46,7 @@ typedef bool lto_bool_t; * @{ */ -#define LTO_API_VERSION 25 +#define LTO_API_VERSION 26 /** * \since prior to LTO_API_VERSION=3 @@ -514,12 +514,25 @@ lto_api_version(void); /** * Sets options to help debug codegen bugs. * + * This function takes one or more options separated by spaces. + * Warning: passing file paths through this function may confuse the argument + * parser if the paths contain spaces. + * * \since prior to LTO_API_VERSION=3 */ extern void lto_codegen_debug_options(lto_code_gen_t cg, const char *); /** + * Same as the previous function, but takes every option separately through an + * array. + * + * \since prior to LTO_API_VERSION=26 + */ +extern void lto_codegen_debug_options_array(lto_code_gen_t cg, + const char *const *, int number); + +/** * Initializes LLVM disassemblers. * FIXME: This doesn't really belong here. * |