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/lib | |
| 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/lib')
| -rw-r--r-- | llvm/lib/LTO/LTOCodeGenerator.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index f87f232c63e..5fef14230a9 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -622,12 +622,9 @@ bool LTOCodeGenerator::compileOptimized(ArrayRef<raw_pwrite_stream *> Out) { return true; } -/// setCodeGenDebugOptions - Set codegen debugging options to aid in debugging -/// LTO problems. -void LTOCodeGenerator::setCodeGenDebugOptions(StringRef Options) { - for (std::pair<StringRef, StringRef> o = getToken(Options); !o.first.empty(); - o = getToken(o.second)) - CodegenOptions.push_back(o.first); +void LTOCodeGenerator::setCodeGenDebugOptions(ArrayRef<const char *> Options) { + for (StringRef Option : Options) + CodegenOptions.push_back(Option); } void LTOCodeGenerator::parseCodeGenDebugOptions() { |

