diff options
Diffstat (limited to 'llvm/lib/Support/TextEncoding.cpp')
| -rw-r--r-- | llvm/lib/Support/TextEncoding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/TextEncoding.cpp b/llvm/lib/Support/TextEncoding.cpp index b675966c8d82..b4ee0f8ee8bf 100644 --- a/llvm/lib/Support/TextEncoding.cpp +++ b/llvm/lib/Support/TextEncoding.cpp @@ -271,7 +271,7 @@ TextEncodingConverterIconv::convertString(StringRef Source, // Setup the input. Use nullptr to reset iconv state if input length is // zero. size_t InputLength = Source.size(); - char *Input = InputLength ? const_cast<char *>(Source.data()) : ""; + char *Input = const_cast<char *>(InputLength ? Source.data() : ""); Ret = iconv(ConvDesc, &Input, &InputLength, &Output, &OutputLength); if (Ret != 0) { if (auto EC = HandleError(Ret)) |
