Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate().
This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63135 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclGroup.cpp b/lib/AST/DeclGroup.cpp
index 62b4077..c7af7cd 100644
--- a/lib/AST/DeclGroup.cpp
+++ b/lib/AST/DeclGroup.cpp
@@ -60,7 +60,7 @@
Decls[i]->Destroy(C);
this->~DeclGroup();
- C.getAllocator().Deallocate((void*) this);
+ C.Deallocate((void*) this);
}
DeclGroupOwningRef::~DeclGroupOwningRef() {