Author: lattner
Date: Fri Oct 12 13:16:23 2007
New Revision: 42921

URL: http://llvm.org/viewvc/llvm-project?rev=42921&view=rev
Log:
don't use intptr_t without including it.

Modified:
    llvm/trunk/include/llvm/ADT/StringMap.h

Modified: llvm/trunk/include/llvm/ADT/StringMap.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringMap.h?rev=42921&r1=42920&r2=42921&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/StringMap.h (original)
+++ llvm/trunk/include/llvm/ADT/StringMap.h Fri Oct 12 13:16:23 2007
@@ -172,7 +172,9 @@
   /// into a StringMapEntry, return the StringMapEntry itself.
   static StringMapEntry &GetStringMapEntryFromValue(ValueTy &V) {
     StringMapEntry *EPtr = 0;
-    char *Ptr = reinterpret_cast<char*>(&V) - (intptr_t)&EPtr->Val;
+    char *Ptr = reinterpret_cast<char*>(&V) - 
+                  (reinterpret_cast<char*>(&EPtr->Val) - 
+                   reinterpret_cast<char*>(EPtr));
     return *reinterpret_cast<StringMapEntry*>(Ptr);
   }
   static const StringMapEntry &GetStringMapEntryFromValue(const ValueTy &V) {


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to