aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2013-01-15 22:09:41 +0000
committerDavid Greene <greened@obbligato.org>2013-01-15 22:09:41 +0000
commit5ba58a1b3cbe79497380e7ccecbe45c8bdd498c1 (patch)
treec383d75f7db1f0cbab90345a410935639cbc2187 /lib/CodeGen/CodeGenModule.cpp
parent3f7b3a754e9698d613672dd1f7af3ccd1b42470a (diff)
Fix Const Cast
Do proper casting to avoid a cast-away-const error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 01bc66b1cd..b1bdc0fb7a 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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 {