aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclGroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/DeclGroup.cpp')
-rw-r--r--lib/AST/DeclGroup.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/AST/DeclGroup.cpp b/lib/AST/DeclGroup.cpp
index 6ec0e5beaf..34b37dada5 100644
--- a/lib/AST/DeclGroup.cpp
+++ b/lib/AST/DeclGroup.cpp
@@ -43,17 +43,18 @@ void DeclGroup::Destroy(ASTContext& C) {
}
DeclGroupOwningRef::~DeclGroupOwningRef() {
- assert (Raw == 0 && "Destroy method not called.");
+ assert (D == 0 && "Destroy method not called.");
}
void DeclGroupOwningRef::Destroy(ASTContext& C) {
- if (!Raw)
+ if (!D)
return;
if (getKind() == DeclKind)
- reinterpret_cast<Decl*>(Raw)->Destroy(C);
- else
- reinterpret_cast<DeclGroup*>(Raw & ~Mask)->Destroy(C);
+ D->Destroy(C);
+ else
+ reinterpret_cast<DeclGroup*>(reinterpret_cast<uintptr_t>(D) &
+ ~Mask)->Destroy(C);
- Raw = 0;
+ D = 0;
}