]> granicus.if.org Git - clang/commitdiff
Drop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 4 Jul 2012 20:19:54 +0000 (20:19 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 4 Jul 2012 20:19:54 +0000 (20:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159723 91177308-0d34-0410-b5e6-96231b3b80d8

23 files changed:
include/clang/AST/DeclFriend.h
include/clang/AST/DeclTemplate.h
include/clang/Sema/Initialization.h
lib/ARCMigrate/ObjCMT.cpp
lib/ARCMigrate/TransAPIUses.cpp
lib/ARCMigrate/TransARCAssign.cpp
lib/ARCMigrate/TransAutoreleasePool.cpp
lib/ARCMigrate/TransBlockObjCVariable.cpp
lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
lib/ARCMigrate/TransGCAttrs.cpp
lib/ARCMigrate/TransGCCalls.cpp
lib/ARCMigrate/TransRetainReleaseDealloc.cpp
lib/ARCMigrate/TransUnbridgedCasts.cpp
lib/ARCMigrate/TransUnusedInitDelegate.cpp
lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp
lib/ARCMigrate/Transforms.cpp
lib/AST/DeclFriend.cpp
lib/AST/ExprCXX.cpp
lib/AST/StmtPrinter.cpp
lib/AST/TypePrinter.cpp
lib/Analysis/AnalysisDeclContext.cpp
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp

index 57a54e65076b2c9c4a3856834f6b0a02f530193f..9a64f08dee5038f362c69b6ddd8adc5c5090cda2 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef LLVM_CLANG_AST_DECLFRIEND_H
 #define LLVM_CLANG_AST_DECLFRIEND_H
 
-#include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 #include "llvm/Support/Compiler.h"
 
@@ -72,10 +71,12 @@ private:
     : Decl(Decl::Friend, Empty), NextFriend() { }
 
   FriendDecl *getNextFriend() {
-    return cast_or_null<FriendDecl>(
-                          NextFriend.get(getASTContext().getExternalSource()));
+    if (!NextFriend.isOffset())
+      return cast_or_null<FriendDecl>(NextFriend.get(0));
+    return getNextFriendSlowCase();
   }
-  
+  FriendDecl *getNextFriendSlowCase();
+
 public:
   static FriendDecl *Create(ASTContext &C, DeclContext *DC,
                             SourceLocation L, FriendUnion Friend_,
index 2727312d746144c7c83189dfb3179ec8ad19a5a9..7affc7e15f27152fa7ab618dbc9731782beb9cac 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef LLVM_CLANG_AST_DECLTEMPLATE_H
 #define LLVM_CLANG_AST_DECLTEMPLATE_H
 
-#include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/Redeclarable.h"
 #include "clang/AST/TemplateBase.h"
index a10b9dbced211f6b8c4614ab5de5f3655bea4416..77659be1470f1408fde033212675f9e55f5f3901 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "clang/Sema/Ownership.h"
 #include "clang/Sema/Overload.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/UnresolvedSet.h"
 #include "clang/Basic/SourceLocation.h"
index 5107db834e7f2d45afe71bcc258ebc6fe1728f0d..0098f973e63dc449c5e1bee5351533cd86ac4c6b 100644 (file)
@@ -10,6 +10,7 @@
 #include "clang/ARCMigrate/ARCMTActions.h"
 #include "clang/Frontend/CompilerInstance.h"
 #include "clang/Frontend/MultiplexConsumer.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/RecursiveASTVisitor.h"
 #include "clang/AST/NSAPI.h"
 #include "clang/AST/ASTConsumer.h"
index aaa82d8dfb7a2a59e2e38efe7978aac439bbbb45..5336f859052f50e6e088767b1a8abfa4d70f58ee 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/Sema/SemaDiagnostic.h"
 
 using namespace clang;
index cfa6da1f99f92a57a71ad9e159141489ef39a433..b83f85a1fac2b0cf354c8fc62b4efda4641e0347 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/Sema/SemaDiagnostic.h"
 
 using namespace clang;
index f0db4d024d323c8680ba1841d1b74d64a2dee92b..5205ce4a70a94ed3265479f5a09cc877381f50c2 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/Sema/SemaDiagnostic.h"
 #include "clang/Basic/SourceManager.h"
 #include <map>
index 2bada9dcd2b1ec41856f42ca2d3bcadfa5f98ff8..ec233ba5e184a98ca147d7f2643e498462c63cbe 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/Basic/SourceManager.h"
 
 using namespace clang;
index d8fabcd94867ca4572998823f6b3d28a5ad5d82d..552cb2fa631c1ed2104258d66f56536b4ccdb830 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/Basic/SourceManager.h"
 
index 007b8f2f88cf5ab67d9d6ac2684f79c670754418..eec7306ba74a63674ddffadbdc6afafa5a843ac9 100644 (file)
@@ -9,12 +9,13 @@
 
 #include "Transforms.h"
 #include "Internals.h"
-#include "clang/Lex/Lexer.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/Basic/SourceManager.h"
-#include "llvm/Support/SaveAndRestore.h"
+#include "clang/Lex/Lexer.h"
 #include "clang/Sema/SemaDiagnostic.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/TinyPtrVector.h"
+#include "llvm/Support/SaveAndRestore.h"
 
 using namespace clang;
 using namespace arcmt;
index cd90343e169b0f719a3f85c03f7eb5bc90b4469e..2ec480c0af642035f739007759752d290a589f15 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/Sema/SemaDiagnostic.h"
 
 using namespace clang;
index b8a84ec5b847c48d65be0e2467833d3edc3ffc22..91d2b399e3f1e66631ee63005ad6e481abb77984 100644 (file)
 
 #include "Transforms.h"
 #include "Internals.h"
-#include "clang/Sema/SemaDiagnostic.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/ParentMap.h"
-#include "clang/Lex/Lexer.h"
 #include "clang/Basic/SourceManager.h"
+#include "clang/Lex/Lexer.h"
+#include "clang/Sema/SemaDiagnostic.h"
 
 using namespace clang;
 using namespace arcmt;
index f8bc5cf932c0e2af81dc6739cd3f85205f80c9a6..ac18b5d6e739775efadb1cbb16311658c2257ae9 100644 (file)
 #include "Transforms.h"
 #include "Internals.h"
 #include "clang/Analysis/DomainSpecific/CocoaConventions.h"
-#include "clang/Sema/SemaDiagnostic.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/ParentMap.h"
-#include "clang/Lex/Lexer.h"
 #include "clang/Basic/SourceManager.h"
+#include "clang/Lex/Lexer.h"
+#include "clang/Sema/SemaDiagnostic.h"
 #include "llvm/ADT/SmallString.h"
 
 using namespace clang;
index 7a825e816515925043a877467abec2ee8b8e28fe..3057e391d0a8cabf2766a54ffec1d881113504fa 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/Sema/SemaDiagnostic.h"
 
 using namespace clang;
index d1f08aac28c2162d8e01b53c1570a2892a2519b1..a07596d0cb0cdc2899b36a1c2e58e76717d00f09 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "Transforms.h"
 #include "Internals.h"
+#include "clang/AST/ASTContext.h"
 
 using namespace clang;
 using namespace arcmt;
index 71598362b523c2e84b9501d5ee1717455bd2c6a6..1175c363163bebe2d3fb901650b36eaf2167c168 100644 (file)
@@ -9,13 +9,14 @@
 
 #include "Transforms.h"
 #include "Internals.h"
-#include "clang/Sema/SemaDiagnostic.h"
-#include "clang/Sema/Sema.h"
+#include "clang/Analysis/DomainSpecific/CocoaConventions.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/RecursiveASTVisitor.h"
 #include "clang/AST/StmtVisitor.h"
-#include "clang/Lex/Lexer.h"
 #include "clang/Basic/SourceManager.h"
-#include "clang/Analysis/DomainSpecific/CocoaConventions.h"
+#include "clang/Lex/Lexer.h"
+#include "clang/Sema/Sema.h"
+#include "clang/Sema/SemaDiagnostic.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/ADT/DenseSet.h"
 #include <map>
index 6e3bd8d4225b88a383a4d5960a5d800dd42a0eb2..553d170fc3d5112b4bed98c60b420c596cb72ff5 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclFriend.h"
 #include "clang/AST/DeclTemplate.h"
 using namespace clang;
 
 void FriendDecl::anchor() { }
 
+FriendDecl *FriendDecl::getNextFriendSlowCase() {
+  return cast_or_null<FriendDecl>(
+                           NextFriend.get(getASTContext().getExternalSource()));
+}
+
 FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC,
                                SourceLocation L,
                                FriendUnion Friend,
index 072e2ecdb4373a1bc1afd4c3223c68381d5af1ea..a7240e6978ada5a0a3b2c49eea4a27020385098c 100644 (file)
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Basic/IdentifierTable.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/ExprCXX.h"
index 5bd61c3b5292b875731386ae9b42f25e0be5e9a8..8b989e6ae38cf211b39f4b26e19203fd0677a386 100644 (file)
@@ -12,6 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/StmtVisitor.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
index 84adad7b13727aaabe19c73d27324df3f76c4737..7567a7331113ec8fca6da2f35824c408bab4b1d8 100644 (file)
@@ -11,6 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"
index b618569cd74305cf1f7dab410304fac0bbac6832..32b1fcfe7c8b257de041cb1e4a7ab963ac266844 100644 (file)
@@ -12,6 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"
index 9823be19427be88d039a5b884ce23e363c3179e7..460841b2ff073095cef9a8f6a19e287978a95d4d 100644 (file)
@@ -13,6 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Serialization/ASTReader.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclTemplate.h"
 #include "clang/AST/StmtVisitor.h"
index 1d2efe48e4487fbae18e1f2eab15691005866ca0..aa24962b66485f739485756d64d9165a428f8065 100644 (file)
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/Serialization/ASTWriter.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
 #include "clang/AST/DeclTemplate.h"