summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Diagnostic.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-02-04 12:30:46 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-02-04 12:30:46 +0000
commit728ed3f3869d5f781c9e3f140bc2a5dbd911f9ab (patch)
treed2d720cc6031a2a71cc9cb60ff072df0ace5fd25 /clang/lib/Basic/Diagnostic.cpp
parent3f85fb2277c2cb27770a04d41c7240f8e85b9e95 (diff)
downloadbcm5719-llvm-728ed3f3869d5f781c9e3f140bc2a5dbd911f9ab.tar.gz
bcm5719-llvm-728ed3f3869d5f781c9e3f140bc2a5dbd911f9ab.zip
Move Storage and StorageAllocator out of the PartialDiagnostic class so we can forward declare them.
Let ASTContext allocate the storage in its BumpPtrAllocator. This will help us remove ASTContext's depedency on PartialDiagnostic.h soon. llvm-svn: 149780
Diffstat (limited to 'clang/lib/Basic/Diagnostic.cpp')
-rw-r--r--clang/lib/Basic/Diagnostic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index c330215db1a..fc7aaebc59a 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -842,13 +842,13 @@ bool DiagnosticConsumer::IncludeInDiagnosticCounts() const { return true; }
void IgnoringDiagConsumer::anchor() { }
-PartialDiagnostic::StorageAllocator::StorageAllocator() {
+PartialDiagnosticStorageAllocator::PartialDiagnosticStorageAllocator() {
for (unsigned I = 0; I != NumCached; ++I)
FreeList[I] = Cached + I;
NumFreeListEntries = NumCached;
}
-PartialDiagnostic::StorageAllocator::~StorageAllocator() {
+PartialDiagnosticStorageAllocator::~PartialDiagnosticStorageAllocator() {
// Don't assert if we are in a CrashRecovery context, as this
// invariant may be invalidated during a crash.
assert((NumFreeListEntries == NumCached || llvm::CrashRecoveryContext::isRecoveringFromCrash()) && "A partial is on the lamb");
OpenPOWER on IntegriCloud