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/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 016f7b1..983c726 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -405,7 +405,7 @@
}
this->~Decl();
- C.getAllocator().Deallocate((void *)this);
+ C.Deallocate((void *)this);
#endif
}