From 0f0e064b654dcef1aed83a552b32c3fbf124d380 Mon Sep 17 00:00:00 2001 From: David Greene Date: Mon, 14 Jan 2013 21:04:38 +0000 Subject: [PATCH] Fix More Casts Fix another cast-away-const cast. llvm-svn: 172466 --- lib/Object/MachOObject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp index a64db1c60f0..529bdf97e59 100644 --- 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( + const_cast(Buffer.data() + Base)); if (!MOO.isSwappedEndian()) { Res = Ptr; return;