summaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/Casting.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/Casting.h')
-rw-r--r--include/llvm/Support/Casting.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Support/Casting.h b/include/llvm/Support/Casting.h
index 37a7c3b..17bcb59 100644
--- a/include/llvm/Support/Casting.h
+++ b/include/llvm/Support/Casting.h
@@ -180,8 +180,9 @@ template<class To, class From, class SimpleFrom> struct cast_convert_val {
template<class To, class FromTy> struct cast_convert_val<To,FromTy,FromTy> {
// This _is_ a simple type, just cast it.
static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
- return reinterpret_cast<typename cast_retty<To, FromTy>::ret_type>(
- const_cast<FromTy&>(Val));
+ typename cast_retty<To, FromTy>::ret_type Res2
+ = (typename cast_retty<To, FromTy>::ret_type)const_cast<FromTy&>(Val);
+ return Res2;
}
};
OpenPOWER on IntegriCloud