don't use intptr_t without including it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-10-12 18:16:23 +00:00
parent a79dd432b3
commit 1ff2ddda08

View File

@ -172,7 +172,9 @@ public:
/// into a StringMapEntry, return the StringMapEntry itself. /// into a StringMapEntry, return the StringMapEntry itself.
static StringMapEntry &GetStringMapEntryFromValue(ValueTy &V) { static StringMapEntry &GetStringMapEntryFromValue(ValueTy &V) {
StringMapEntry *EPtr = 0; 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); return *reinterpret_cast<StringMapEntry*>(Ptr);
} }
static const StringMapEntry &GetStringMapEntryFromValue(const ValueTy &V) { static const StringMapEntry &GetStringMapEntryFromValue(const ValueTy &V) {