diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 22:29:24 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 22:29:24 +0000 |
commit | 7ec12c928af2a2b691616bc2d43bf06daf1c4ca8 (patch) | |
tree | 302d31dfb79f2f0769bbecdd3bf823070488d11d /clang/lib/AST | |
parent | 904febc89c5324ae9e998f7bc55b148098f6f868 (diff) | |
download | bcm5719-llvm-7ec12c928af2a2b691616bc2d43bf06daf1c4ca8.tar.gz bcm5719-llvm-7ec12c928af2a2b691616bc2d43bf06daf1c4ca8.zip |
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.
This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.
This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.
llvm-svn: 150006
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 7 | ||||
-rw-r--r-- | clang/lib/AST/Decl.cpp | 15 | ||||
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 1 | ||||
-rw-r--r-- | clang/lib/AST/DeclarationName.cpp | 15 | ||||
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 1 | ||||
-rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 1 | ||||
-rw-r--r-- | clang/lib/AST/NestedNameSpecifier.cpp | 7 | ||||
-rw-r--r-- | clang/lib/AST/Type.cpp | 21 |
8 files changed, 0 insertions, 68 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 416045e2342..069f1068da3 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -24,7 +24,6 @@ #include "clang/AST/RecordLayout.h" #include "clang/AST/Mangle.h" #include "clang/Basic/Builtins.h" -#include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/SmallString.h" @@ -242,9 +241,6 @@ ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM, LastSDM(0, 0), UniqueBlockByRefTypeID(0) { - // Create a new allocator for partial diagnostics. - DiagAllocator = new (BumpAlloc) PartialDiagnosticStorageAllocator; - if (size_reserve > 0) Types.reserve(size_reserve); TUDecl = TranslationUnitDecl::Create(*this); @@ -289,9 +285,6 @@ ASTContext::~ASTContext() { AEnd = DeclAttrs.end(); A != AEnd; ++A) A->second->~AttrVec(); - - // Destroy the partial diagnostic allocator. - DiagAllocator->~PartialDiagnosticStorageAllocator(); } void ASTContext::AddDeallocation(void (*Callback)(void*), void *Data) { diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 03cfc83eca5..d80e06b322a 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -25,7 +25,6 @@ #include "clang/Basic/Builtins.h" #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/Module.h" -#include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/Specifiers.h" #include "clang/Basic/TargetInfo.h" #include "llvm/Support/ErrorHandling.h" @@ -3002,17 +3001,3 @@ SourceRange ImportDecl::getSourceRange() const { return SourceRange(getLocation(), getIdentifierLocs().back()); } - -const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB, - const NamedDecl* ND) { - DB.AddTaggedVal(reinterpret_cast<intptr_t>(ND), - DiagnosticsEngine::ak_nameddecl); - return DB; -} - -const PartialDiagnostic &clang::operator<<(const PartialDiagnostic &PD, - const NamedDecl* ND) { - PD.AddTaggedVal(reinterpret_cast<intptr_t>(ND), - DiagnosticsEngine::ak_nameddecl); - return PD; -} diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index d64385a5b98..d5221031a54 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -20,7 +20,6 @@ #include "clang/AST/ExprCXX.h" #include "clang/AST/TypeLoc.h" #include "clang/Basic/IdentifierTable.h" -#include "clang/Basic/PartialDiagnostic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" using namespace clang; diff --git a/clang/lib/AST/DeclarationName.cpp b/clang/lib/AST/DeclarationName.cpp index f550cf89089..a5488e67ca2 100644 --- a/clang/lib/AST/DeclarationName.cpp +++ b/clang/lib/AST/DeclarationName.cpp @@ -18,7 +18,6 @@ #include "clang/AST/TypeLoc.h" #include "clang/AST/TypeOrdering.h" #include "clang/Basic/IdentifierTable.h" -#include "clang/Basic/PartialDiagnostic.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/Support/ErrorHandling.h" @@ -621,17 +620,3 @@ SourceLocation DeclarationNameInfo::getEndLoc() const { } llvm_unreachable("Unexpected declaration name kind"); } - -const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB, - DeclarationName N) { - DB.AddTaggedVal(N.getAsOpaqueInteger(), - DiagnosticsEngine::ak_declarationname); - return DB; -} - -const PartialDiagnostic &clang::operator<<(const PartialDiagnostic &PD, - DeclarationName N) { - PD.AddTaggedVal(N.getAsOpaqueInteger(), - DiagnosticsEngine::ak_declarationname); - return PD; -} diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 283132a3568..e33d22a4aa3 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -42,7 +42,6 @@ #include "clang/AST/ASTDiagnostic.h" #include "clang/AST/Expr.h" #include "clang/Basic/Builtins.h" -#include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/SmallString.h" #include <cstring> diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index e39031dcedf..59192428b88 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -24,7 +24,6 @@ #include "clang/AST/ExprObjC.h" #include "clang/AST/TypeLoc.h" #include "clang/Basic/ABI.h" -#include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/StringExtras.h" diff --git a/clang/lib/AST/NestedNameSpecifier.cpp b/clang/lib/AST/NestedNameSpecifier.cpp index 9b714ed7e88..c59d40a8c2b 100644 --- a/clang/lib/AST/NestedNameSpecifier.cpp +++ b/clang/lib/AST/NestedNameSpecifier.cpp @@ -18,7 +18,6 @@ #include "clang/AST/PrettyPrinter.h" #include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" -#include "clang/Basic/Diagnostic.h" #include "llvm/Support/raw_ostream.h" #include <cassert> @@ -640,9 +639,3 @@ NestedNameSpecifierLocBuilder::getWithLocInContext(ASTContext &Context) const { return NestedNameSpecifierLoc(Representation, Mem); } -const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB, - NestedNameSpecifier *NNS) { - DB.AddTaggedVal(reinterpret_cast<intptr_t>(NNS), - DiagnosticsEngine::ak_nestednamespec); - return DB; -} diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index be38ba66bc0..ebf5706ed03 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -20,7 +20,6 @@ #include "clang/AST/Expr.h" #include "clang/AST/PrettyPrinter.h" #include "clang/AST/TypeVisitor.h" -#include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/Specifiers.h" #include "llvm/ADT/APSInt.h" #include "llvm/ADT/StringExtras.h" @@ -2310,23 +2309,3 @@ bool QualType::hasTrivialAssignment(ASTContext &Context, bool Copying) const { return true; } - -const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB, - QualType T) { - DB.AddTaggedVal(reinterpret_cast<intptr_t>(T.getAsOpaquePtr()), - DiagnosticsEngine::ak_qualtype); - return DB; -} - -const PartialDiagnostic &clang::operator<<(const PartialDiagnostic &PD, - QualType T) { - PD.AddTaggedVal(reinterpret_cast<intptr_t>(T.getAsOpaquePtr()), - DiagnosticsEngine::ak_qualtype); - return PD; -} - -const DiagnosticBuilder &clang::operator<<(const DiagnosticBuilder &DB, - CanQualType T) { - DB << static_cast<QualType>(T); - return DB; -} |