diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 01bc66b1cd4..b1bdc0fb7a2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2280,7 +2280,8 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { llvm::Constant *C = 0; if (isUTF16) { ArrayRef<uint16_t> Arr = - llvm::makeArrayRef<uint16_t>((uint16_t*)Entry.getKey().data(), + llvm::makeArrayRef<uint16_t>(reinterpret_cast<uint16_t*>( + const_cast<char *>(Entry.getKey().data())), Entry.getKey().size() / 2); C = llvm::ConstantDataArray::get(VMContext, Arr); } else { |