[cfe-commits] r172559 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
David Greene
greened at obbligato.org
Tue Jan 15 14:09:42 PST 2013
Author: greened
Date: Tue Jan 15 16:09:41 2013
New Revision: 172559
URL: http://llvm.org/viewvc/llvm-project?rev=172559&view=rev
Log:
Fix Const Cast
Do proper casting to avoid a cast-away-const error.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=172559&r1=172558&r2=172559&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Jan 15 16:09:41 2013
@@ -2280,7 +2280,8 @@
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 {
More information about the cfe-commits
mailing list