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
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index 9658745..8e3ef08 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/lib/AST/DeclSerialization.cpp
@@ -135,12 +135,10 @@
// *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);