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 | ccd89b441975386fcf140b4dc3a2576a3a2f9e65 (patch) | |
| tree | 53cb595700f330b188469dc040749f6e369b3312 | |
| parent | e9b76afe4fb7008c75cec221d2a8992e5522334e (diff) | |
| download | bcm5719-llvm-ccd89b441975386fcf140b4dc3a2576a3a2f9e65.tar.gz bcm5719-llvm-ccd89b441975386fcf140b4dc3a2576a3a2f9e65.zip | |
use typedef to make hack more transparent and also appease gcc3.4 constness warning
llvm-svn: 106215
| -rw-r--r-- | clang/include/clang/Basic/IdentifierTable.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h index 582d59c18a3..6b8bcdc52f6 100644 --- a/clang/include/clang/Basic/IdentifierTable.h +++ b/clang/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; } |

