diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-03 01:28:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-03 01:28:04 +0000 |
commit | 90f255356e4abc03287d35d323a1af0127dfcfd2 (patch) | |
tree | a1ed6a04d7382f22f63eab21cbc852cc2e572f63 /include/clang/Basic/SourceManager.h | |
parent | 9eb5c6d3242d85359b2d669564c5e2826efb1931 (diff) |
Content Cache only needs to be 4-byte aligned. Since it is stored in
an std::set, we can't make a strong guarantee about what its alignment
will be. Since I don't need the 3rd bit anyway yet, just change the
assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index a63ef79037..7dbf0ccf61 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -143,7 +143,7 @@ namespace SrcMgr { FileInfo X; X.IncludeLoc = IL.getRawEncoding(); X.Data = (uintptr_t)Con; - assert((X.Data & 7) == 0 &&"ContentCache pointer insufficiently aligned"); + assert((X.Data & 3) == 0 &&"ContentCache pointer insufficiently aligned"); assert((unsigned)FileCharacter < 4 && "invalid file character"); X.Data |= (unsigned)FileCharacter; return X; @@ -153,7 +153,7 @@ namespace SrcMgr { return SourceLocation::getFromRawEncoding(IncludeLoc); } const ContentCache* getContentCache() const { - return reinterpret_cast<const ContentCache*>(Data & ~7UL); + return reinterpret_cast<const ContentCache*>(Data & ~3UL); } /// getCharacteristic - Return whether this is a system header or not. |