diff options
| author | David Greene <greened@obbligato.org> | 2013-01-14 21:04:38 +0000 |
|---|---|---|
| committer | David Greene <greened@obbligato.org> | 2013-01-14 21:04:38 +0000 |
| commit | fcdab1d9954affc1da97b6117e02b585f83b8792 (patch) | |
| tree | 8c4345ade5e566c6617f544f47ea01c43f18dda9 /llvm/lib/Object | |
| parent | 7155a7d061a01aea9dbbcdb53adb5ebdea3e8b9f (diff) | |
| download | bcm5719-llvm-fcdab1d9954affc1da97b6117e02b585f83b8792.tar.gz bcm5719-llvm-fcdab1d9954affc1da97b6117e02b585f83b8792.zip | |
Fix More Casts
Fix another cast-away-const cast.
llvm-svn: 172466
Diffstat (limited to 'llvm/lib/Object')
| -rw-r--r-- | llvm/lib/Object/MachOObject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOObject.cpp b/llvm/lib/Object/MachOObject.cpp index a64db1c60f0..529bdf97e59 100644 --- a/llvm/lib/Object/MachOObject.cpp +++ b/llvm/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; |

