summaryrefslogtreecommitdiffstats
path: root/clang/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
commit0a528db95d81bbc6d118e5d3fd752e52923547a1 (patch)
tree3fbdeb83d365913cc71735b7089bf355ae43efe5 /clang/lib/CodeGen/CodeGenModule.cpp
parent9431926064f1c14288b28df1cd855bf791ec9e9b (diff)
downloadbcm5719-llvm-0a528db95d81bbc6d118e5d3fd752e52923547a1.tar.gz
bcm5719-llvm-0a528db95d81bbc6d118e5d3fd752e52923547a1.zip
Fix Const Cast
Do proper casting to avoid a cast-away-const error. llvm-svn: 172559
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
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 {
OpenPOWER on IntegriCloud