aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/TypeSerialization.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-28 23:37:31 +0000
committerChris Lattner <sabre@nondot.org>2008-11-28 23:37:31 +0000
commit5cf243a883872441d73ca49cea7e20de5802629b (patch)
treea71a12bbd313243b98622cdf2ed50ddd9c41f33a /lib/AST/TypeSerialization.cpp
parent96cb9fb62008276266257ae7b53fa4b64224290d (diff)
Switch QualType to use llvm::PointerIntPair internally to do the pointer
bitmangling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypeSerialization.cpp')
-rw-r--r--lib/AST/TypeSerialization.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/AST/TypeSerialization.cpp b/lib/AST/TypeSerialization.cpp
index b336722763..db93e4b103 100644
--- a/lib/AST/TypeSerialization.cpp
+++ b/lib/AST/TypeSerialization.cpp
@@ -30,15 +30,17 @@ void QualType::Emit(Serializer& S) const {
}
QualType QualType::ReadVal(Deserializer& D) {
- QualType Q;
- D.ReadUIntPtr(Q.ThePtr,false);
- Q.ThePtr |= D.ReadInt();
- return Q;
+ uintptr_t Val;
+ D.ReadUIntPtr(Val, false);
+ return QualType(reinterpret_cast<Type*>(Val), D.ReadInt());
}
void QualType::ReadBackpatch(Deserializer& D) {
- D.ReadUIntPtr(ThePtr,true);
- ThePtr |= D.ReadInt();
+ uintptr_t Val;
+ D.ReadUIntPtr(Val, false);
+
+ Value.setPointer(reinterpret_cast<Type*>(Val));
+ Value.setInt(D.ReadInt());
}
//===----------------------------------------------------------------------===//