diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-06-17 10:59:08 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-06-17 10:59:08 +0000 |
commit | 40844a8b5a89676fb61898d61ea4a7fa98eb9b6b (patch) | |
tree | 598b8b45f89730927d9e85c4e580fd6e92c21872 /include/clang/Basic/IdentifierTable.h | |
parent | 7558cd00a5ac620990174f3cba86aea4bd9a000a (diff) |
use typedef to make hack more transparent and also appease gcc3.4 constness warning
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/IdentifierTable.h')
-rw-r--r-- | include/clang/Basic/IdentifierTable.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h index 582d59c18a..6b8bcdc52f 100644 --- a/include/clang/Basic/IdentifierTable.h +++ b/include/clang/Basic/IdentifierTable.h @@ -89,7 +89,8 @@ public: // The 'this' pointer really points to a // std::pair<IdentifierInfo, const char*>, where internal pointer // points to the external string data. - return ((std::pair<IdentifierInfo, const char*>*) this)->second; + typedef std::pair<IdentifierInfo, const char*> actualtype; + return ((const actualtype*) this)->second; } /// getLength - Efficiently return the length of this identifier info. @@ -101,7 +102,8 @@ public: // The 'this' pointer really points to a // std::pair<IdentifierInfo, const char*>, where internal pointer // points to the external string data. - const char* p = ((std::pair<IdentifierInfo, const char*>*) this)->second-2; + typedef std::pair<IdentifierInfo, const char*> actualtype; + const char* p = ((const actualtype*) this)->second - 2; return (((unsigned) p[0]) | (((unsigned) p[1]) << 8)) - 1; } |