diff options
author | Chris Lattner <sabre@nondot.org> | 2007-10-12 18:16:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-10-12 18:16:23 +0000 |
commit | 1ff2ddda083a3c71a04789fe9845d41f7aaaa0ec (patch) | |
tree | ce2fd76eff35850f513150ddb4123597b2bb6669 /include/llvm/ADT/StringMap.h | |
parent | a79dd432b35bc957fcbc1c3936d2a76639b8d0b2 (diff) | |
download | external_llvm-1ff2ddda083a3c71a04789fe9845d41f7aaaa0ec.tar.gz external_llvm-1ff2ddda083a3c71a04789fe9845d41f7aaaa0ec.tar.bz2 external_llvm-1ff2ddda083a3c71a04789fe9845d41f7aaaa0ec.zip |
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
Diffstat (limited to 'include/llvm/ADT/StringMap.h')
-rw-r--r-- | include/llvm/ADT/StringMap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h index 7f8657e560..2dff04c504 100644 --- a/include/llvm/ADT/StringMap.h +++ b/include/llvm/ADT/StringMap.h @@ -172,7 +172,9 @@ public: /// 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) { |