diff --git a/include/clang/AST/PrettyPrinter.h b/include/clang/AST/PrettyPrinter.h index fc8ac36b3b..ae56671d90 100644 --- a/include/clang/AST/PrettyPrinter.h +++ b/include/clang/AST/PrettyPrinter.h @@ -15,10 +15,7 @@ #define LLVM_CLANG_AST_PRETTY_PRINTER_H #include "clang/Basic/LangOptions.h" - -namespace llvm { - class raw_ostream; -} +#include "clang/Basic/LLVM.h" namespace clang { @@ -29,7 +26,7 @@ class LangOptions; class PrinterHelper { public: virtual ~PrinterHelper(); - virtual bool handledStmt(Stmt* E, llvm::raw_ostream& OS) = 0; + virtual bool handledStmt(Stmt* E, raw_ostream& OS) = 0; }; /// \brief Describes how types, statements, expressions, and diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index 96acffc981..6e035fcb80 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_SOURCEMANAGER_H #define LLVM_CLANG_SOURCEMANAGER_H +#include "clang/Basic/LLVM.h" #include "clang/Basic/SourceLocation.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/DataTypes.h" @@ -25,10 +26,6 @@ #include #include -namespace llvm { -class StringRef; -} - namespace clang { class Diagnostic; diff --git a/include/clang/Lex/DirectoryLookup.h b/include/clang/Lex/DirectoryLookup.h index bcc33f7ec0..ca116df9de 100644 --- a/include/clang/Lex/DirectoryLookup.h +++ b/include/clang/Lex/DirectoryLookup.h @@ -14,12 +14,9 @@ #ifndef LLVM_CLANG_LEX_DIRECTORYLOOKUP_H #define LLVM_CLANG_LEX_DIRECTORYLOOKUP_H +#include "clang/Basic/LLVM.h" #include "clang/Basic/SourceManager.h" -namespace llvm { - class StringRef; - template class SmallVectorImpl; -} namespace clang { class HeaderMap; class DirectoryEntry; diff --git a/include/clang/StaticAnalyzer/Core/CheckerProvider.h b/include/clang/StaticAnalyzer/Core/CheckerProvider.h index 905d4c959f..86d05430a6 100644 --- a/include/clang/StaticAnalyzer/Core/CheckerProvider.h +++ b/include/clang/StaticAnalyzer/Core/CheckerProvider.h @@ -14,12 +14,9 @@ #ifndef LLVM_CLANG_SA_CORE_CHECKERPROVIDER_H #define LLVM_CLANG_SA_CORE_CHECKERPROVIDER_H +#include "clang/Basic/LLVM.h" #include "llvm/ADT/StringRef.h" -namespace llvm { - class raw_ostream; -} - namespace clang { namespace ento { diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h b/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h index 2f610c9c40..35cd142e97 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h @@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_GR_VALUESTATE_H #define LLVM_CLANG_GR_VALUESTATE_H +#include "clang/Basic/LLVM.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/Environment.h" #include "clang/StaticAnalyzer/Core/PathSensitive/Store.h" @@ -21,12 +22,10 @@ #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/ImmutableMap.h" -#include "llvm/Support/Casting.h" namespace llvm { class APSInt; class BumpPtrAllocator; -class raw_ostream; } namespace clang { diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h index 05173aa036..c2a2a9a914 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h @@ -19,15 +19,14 @@ #include "clang/AST/CharUnits.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclObjC.h" +#include "clang/Basic/LLVM.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h" -#include "llvm/Support/Casting.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/ADT/FoldingSet.h" #include namespace llvm { class BumpPtrAllocator; -class raw_ostream; } namespace clang { diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index 6761df4b37..5b72ca6742 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -15,14 +15,10 @@ #ifndef LLVM_CLANG_GR_RVALUE_H #define LLVM_CLANG_GR_RVALUE_H +#include "clang/Basic/LLVM.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h" -#include "llvm/Support/Casting.h" #include "llvm/ADT/ImmutableList.h" -namespace llvm { - class raw_ostream; -} - //==------------------------------------------------------------------------==// // Base SVal types. //==------------------------------------------------------------------------==// diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h index 521eb55b87..0cb4ad992b 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -18,13 +18,13 @@ #include "clang/AST/Decl.h" #include "clang/AST/Expr.h" #include "clang/Analysis/AnalysisContext.h" +#include "clang/Basic/LLVM.h" #include "llvm/Support/DataTypes.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/DenseSet.h" namespace llvm { class BumpPtrAllocator; -class raw_ostream; } namespace clang { diff --git a/lib/CodeGen/CGCXXABI.h b/lib/CodeGen/CGCXXABI.h index 8c0df38ff1..c2abf35832 100644 --- a/lib/CodeGen/CGCXXABI.h +++ b/lib/CodeGen/CGCXXABI.h @@ -15,14 +15,14 @@ #ifndef CLANG_CODEGEN_CXXABI_H #define CLANG_CODEGEN_CXXABI_H +#include "clang/Basic/LLVM.h" + #include "CodeGenFunction.h" namespace llvm { class Constant; class Type; class Value; - - template class SmallVectorImpl; } namespace clang { diff --git a/lib/CodeGen/CGRecordLayout.h b/lib/CodeGen/CGRecordLayout.h index e2fd45dc86..25a0a508f1 100644 --- a/lib/CodeGen/CGRecordLayout.h +++ b/lib/CodeGen/CGRecordLayout.h @@ -10,12 +10,13 @@ #ifndef CLANG_CODEGEN_CGRECORDLAYOUT_H #define CLANG_CODEGEN_CGRECORDLAYOUT_H -#include "llvm/ADT/DenseMap.h" -#include "llvm/DerivedTypes.h" #include "clang/AST/CharUnits.h" #include "clang/AST/Decl.h" +#include "clang/Basic/LLVM.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/DerivedTypes.h" + namespace llvm { - class raw_ostream; class StructType; }