[libcxxabi] r231852 - Remove unneeded const_cast in readPointerHelper. Pointed out by jroelofs

Eric Fiselier eric at efcs.ca
Tue Mar 10 14:32:53 PDT 2015


Author: ericwf
Date: Tue Mar 10 16:32:53 2015
New Revision: 231852

URL: http://llvm.org/viewvc/llvm-project?rev=231852&view=rev
Log:
Remove unneeded const_cast in readPointerHelper. Pointed out by jroelofs

Modified:
    libcxxabi/trunk/src/cxa_personality.cpp

Modified: libcxxabi/trunk/src/cxa_personality.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_personality.cpp?rev=231852&r1=231851&r2=231852&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_personality.cpp (original)
+++ libcxxabi/trunk/src/cxa_personality.cpp Tue Mar 10 16:32:53 2015
@@ -148,7 +148,7 @@ namespace
 template <class AsType>
 uintptr_t readPointerHelper(const uint8_t*& p) {
     AsType value;
-    memcpy(&value, const_cast<uint8_t*>(p), sizeof(AsType));
+    memcpy(&value, p, sizeof(AsType));
     p += sizeof(AsType);
     return static_cast<uintptr_t>(value);
 }





More information about the cfe-commits mailing list