From 8b70b78ba489b090d9866e6a4084ab1e8613b527 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 16 Nov 2003 20:21:15 +0000 Subject: Fixes for PR114: Thanks to Reid Spencer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Casting.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/llvm/Support/Casting.h') diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h index 4b070c18d8..abc80aac7a 100644 --- a/include/llvm/Support/Casting.h +++ b/include/llvm/Support/Casting.h @@ -37,7 +37,7 @@ template struct simplify_type { template struct simplify_type { typedef const From SimpleType; static SimpleType &getSimplifiedValue(const From &Val) { - return simplify_type::getSimplifiedValue((From&)Val); + return simplify_type::getSimplifiedValue(static_cast(Val)); } }; @@ -178,7 +178,8 @@ template struct cast_convert_val { template struct cast_convert_val { // This _is_ a simple type, just cast it. static typename cast_retty::ret_type doit(const FromTy &Val) { - return (typename cast_retty::ret_type)Val; + return reinterpret_cast::ret_type>( + const_cast(Val)); } }; -- cgit v1.2.3-18-g5258