aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-29 06:06:59 +0000
committerChris Lattner <sabre@nondot.org>2009-03-29 06:06:59 +0000
commitee219fd5f2776d8dd39d857f87304297b5ed743a (patch)
tree6a1f0d98a223dac5a4fac1e5069811f147647daf /lib/AST/DeclBase.cpp
parent4656978783e444bbd4a70ead1946e341587779ca (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/DeclBase.cpp')
-rw-r--r--lib/AST/DeclBase.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 9ab269d305..d45ad4177c 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -129,8 +129,7 @@ void Decl::setDeclContext(DeclContext *DC) {
if (isOutOfSemaDC())
delete getMultipleDC();
- DeclCtx.setPointer(DC);
- DeclCtx.setInt(false);
+ DeclCtx = DC;
}
void Decl::setLexicalDeclContext(DeclContext *DC) {
@@ -141,8 +140,7 @@ void Decl::setLexicalDeclContext(DeclContext *DC) {
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;
}