summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Twine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Support/Twine.cpp b/lib/Support/Twine.cpp
index 21504e964e..b3ea0132e4 100644
--- a/lib/Support/Twine.cpp
+++ b/lib/Support/Twine.cpp
@@ -48,10 +48,10 @@ void Twine::printOneChild(raw_ostream &OS, const void *Ptr,
OS << *static_cast<const StringRef*>(Ptr);
break;
case Twine::DecUIKind:
- OS << *static_cast<const unsigned int*>(Ptr);
+ OS << (unsigned)(uintptr_t)Ptr;
break;
case Twine::DecIKind:
- OS << *static_cast<const int*>(Ptr);
+ OS << (int)(intptr_t)Ptr;
break;
case Twine::DecULKind:
OS << *static_cast<const unsigned long*>(Ptr);
@@ -95,10 +95,10 @@ void Twine::printOneChildRepr(raw_ostream &OS, const void *Ptr,
<< static_cast<const StringRef*>(Ptr) << "\"";
break;
case Twine::DecUIKind:
- OS << "decUI:\"" << *static_cast<const unsigned int*>(Ptr) << "\"";
+ OS << "decUI:\"" << (unsigned)(uintptr_t)Ptr << "\"";
break;
case Twine::DecIKind:
- OS << "decI:\"" << *static_cast<const int*>(Ptr) << "\"";
+ OS << "decI:\"" << (int)(intptr_t)Ptr << "\"";
break;
case Twine::DecULKind:
OS << "decUL:\"" << *static_cast<const unsigned long*>(Ptr) << "\"";