projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9431926
)
Fix Const Cast
author
David Greene
<greened@obbligato.org>
Tue, 15 Jan 2013 22:09:41 +0000
(22:09 +0000)
committer
David Greene
<greened@obbligato.org>
Tue, 15 Jan 2013 22:09:41 +0000
(22:09 +0000)
Do proper casting to avoid a cast-away-const error.
llvm-svn: 172559
clang/lib/CodeGen/CodeGenModule.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/CodeGenModule.cpp
b/clang/lib/CodeGen/CodeGenModule.cpp
index 01bc66b1cd4a5452f312abdfe8088e471478dff1..b1bdc0fb7a263816a56cdf0e4f316eb8a5d12612 100644
(file)
--- 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 {