diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-29 06:06:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-29 06:06:59 +0000 |
commit | ee219fd5f2776d8dd39d857f87304297b5ed743a (patch) | |
tree | 6a1f0d98a223dac5a4fac1e5069811f147647daf /lib/AST/DeclSerialization.cpp | |
parent | 4656978783e444bbd4a70ead1946e341587779ca (diff) |
switch DeclBase::DeclCtx to the new happy and type-safe
llvm::PointerUnion class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclSerialization.cpp')
-rw-r--r-- | lib/AST/DeclSerialization.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp index 965874502d..8e3ef08d2c 100644 --- a/lib/AST/DeclSerialization.cpp +++ b/lib/AST/DeclSerialization.cpp @@ -135,12 +135,10 @@ Decl* Decl::Create(Deserializer& D, ASTContext& C) { // *object* for back-patching. Its actual value will get filled in later. uintptr_t X; D.ReadUIntPtr(X, SemaDCPtrID); - Dcl->DeclCtx.setFromOpaqueValue(reinterpret_cast<void*>(X)); - } - else { + Dcl->DeclCtx = reinterpret_cast<DeclContext*>(X); + } else { MultipleDC *MDC = new MultipleDC(); - Dcl->DeclCtx.setPointer(reinterpret_cast<DeclContext*>(MDC)); - Dcl->DeclCtx.setInt(true); + Dcl->DeclCtx = MDC; // Allow back-patching. Observe that we register the variable of the // *object* for back-patching. Its actual value will get filled in later. D.ReadPtr(MDC->SemanticDC, SemaDCPtrID); |