diff --git a/lib/Support/UTF16Stream.cpp b/lib/Support/UTF16Stream.cpp index f4389690349..e2cda5626c1 100644 --- a/lib/Support/UTF16Stream.cpp +++ b/lib/Support/UTF16Stream.cpp @@ -48,7 +48,7 @@ bool UTF16Stream::refill() { &utf8Begin_, utf8End_, (llvm::UTF16 **)&out, - (llvm::UTF16 *)end_, + (llvm::UTF16 *)const_cast(end_), llvm::lenientConversion); if (cRes != llvm::ConversionResult::targetExhausted) {