projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
914d4a7
)
Fix More Casts
author
David Greene
<greened@obbligato.org>
Mon, 14 Jan 2013 21:04:38 +0000
(21:04 +0000)
committer
David Greene
<greened@obbligato.org>
Mon, 14 Jan 2013 21:04:38 +0000
(21:04 +0000)
Fix another cast-away-const cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172466
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Object/MachOObject.cpp
patch
|
blob
|
history
diff --git
a/lib/Object/MachOObject.cpp
b/lib/Object/MachOObject.cpp
index a64db1c60f02d5f085a158cb7a38ec844446aa4c..529bdf97e59dad14840a9055e82e6a5a73aa39c7 100644
(file)
--- a/
lib/Object/MachOObject.cpp
+++ b/
lib/Object/MachOObject.cpp
@@
-44,7
+44,8
@@
static void ReadInMemoryStruct(const MachOObject &MOO,
}
// Check whether we can return a direct pointer.
- struct_type *Ptr = (struct_type *) (Buffer.data() + Base);
+ struct_type *Ptr = reinterpret_cast<struct_type *>(
+ const_cast<char *>(Buffer.data() + Base));
if (!MOO.isSwappedEndian()) {
Res = Ptr;
return;