aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/IdentifierTable.h
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-06-17 10:59:08 +0000
committerGabor Greif <ggreif@gmail.com>2010-06-17 10:59:08 +0000
commit40844a8b5a89676fb61898d61ea4a7fa98eb9b6b (patch)
tree598b8b45f89730927d9e85c4e580fd6e92c21872 /include/clang/Basic/IdentifierTable.h
parent7558cd00a5ac620990174f3cba86aea4bd9a000a (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.h6
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;
}