[LTO] Use StringRef instead of C-style strings in setCodeGenDebugOptions
authorMomchil Velikov <momchil.velikov@arm.com>
Mon, 22 Jun 2020 10:14:53 +0000 (11:14 +0100)
committerMomchil Velikov <momchil.velikov@arm.com>
Mon, 22 Jun 2020 10:22:18 +0000 (11:22 +0100)
commit75b0bbca1d0cb1967025bdaabddac8f75f1369bc
tree4cb268a0d5dc46f485a1349ae8f808b8983a4fe8
parenta5bd75aab861df8cea8d1c6b88e764ad4a2c09ea
[LTO] Use StringRef instead of C-style strings in setCodeGenDebugOptions

Fixes an issue with missing nul-terminators and saves us some string
copying, compared to a version which would insert nul-terminators.

Differential Revision: https://reviews.llvm.org/D82033
llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
llvm/lib/LTO/LTOCodeGenerator.cpp
llvm/tools/lto/lto.cpp