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/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 9ab269d..d45ad41 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -129,8 +129,7 @@
if (isOutOfSemaDC())
delete getMultipleDC();
- DeclCtx.setPointer(DC);
- DeclCtx.setInt(false);
+ DeclCtx = DC;
}
void Decl::setLexicalDeclContext(DeclContext *DC) {
@@ -141,8 +140,7 @@
MultipleDC *MDC = new MultipleDC();
MDC->SemanticDC = getDeclContext();
MDC->LexicalDC = DC;
- DeclCtx.setPointer(reinterpret_cast<DeclContext*>(MDC));
- DeclCtx.setInt(true);
+ DeclCtx = MDC;
} else {
getMultipleDC()->LexicalDC = DC;
}