]> granicus.if.org Git - clang/commitdiff
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 20 Dec 2011 02:48:34 +0000 (02:48 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 20 Dec 2011 02:48:34 +0000 (02:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8

80 files changed:
include/clang/AST/Attr.h
include/clang/AST/Decl.h
include/clang/AST/DeclCXX.h
include/clang/AST/DeclFriend.h
include/clang/AST/DeclObjC.h
include/clang/AST/DeclTemplate.h
include/clang/AST/ExprCXX.h
include/clang/AST/Mangle.h
include/clang/Analysis/Analyses/Dominators.h
include/clang/Analysis/Analyses/LiveVariables.h
include/clang/Analysis/Analyses/PostOrderCFGView.h
include/clang/Analysis/Analyses/ReachableCode.h
include/clang/Basic/Diagnostic.h
include/clang/Basic/FileSystemStatCache.h
include/clang/CodeGen/CodeGenAction.h
include/clang/CodeGen/ModuleBuilder.h
include/clang/Driver/Action.h
include/clang/Driver/Job.h
include/clang/Frontend/ChainedDiagnosticConsumer.h
include/clang/Frontend/FrontendAction.h
include/clang/Lex/Lexer.h
include/clang/Lex/PPCallbacks.h
include/clang/Lex/PreprocessorLexer.h
include/clang/Sema/SemaConsumer.h
include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
include/clang/StaticAnalyzer/Core/Checker.h
include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
lib/AST/AttrImpl.cpp
lib/AST/Decl.cpp
lib/AST/DeclCXX.cpp
lib/AST/DeclFriend.cpp
lib/AST/DeclObjC.cpp
lib/AST/DeclTemplate.cpp
lib/AST/ExprCXX.cpp
lib/AST/Mangle.cpp
lib/Analysis/Dominators.cpp [new file with mode: 0644]
lib/Analysis/LiveVariables.cpp
lib/Analysis/PostOrderCFGView.cpp
lib/Analysis/ReachableCode.cpp
lib/Basic/Diagnostic.cpp
lib/Basic/FileSystemStatCache.cpp
lib/CodeGen/CodeGenAction.cpp
lib/CodeGen/ModuleBuilder.cpp
lib/Driver/Action.cpp
lib/Driver/Job.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib/Driver/Tools.cpp
lib/Driver/Tools.h
lib/Frontend/ChainedDiagnosticConsumer.cpp [new file with mode: 0644]
lib/Frontend/FrontendAction.cpp
lib/Lex/Lexer.cpp
lib/Lex/PPCallbacks.cpp [new file with mode: 0644]
lib/Lex/PreprocessorLexer.cpp
lib/Parse/ParseObjc.cpp
lib/Sema/AnalysisBasedWarnings.cpp
lib/Sema/SemaConsumer.cpp [new file with mode: 0644]
lib/StaticAnalyzer/Core/AnalysisManager.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp
lib/StaticAnalyzer/Core/Checker.cpp
lib/StaticAnalyzer/Core/CoreEngine.cpp
lib/StaticAnalyzer/Core/ExplodedGraph.cpp
lib/StaticAnalyzer/Core/MemRegion.cpp
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
lib/StaticAnalyzer/Core/ProgramState.cpp
lib/StaticAnalyzer/Core/SValBuilder.cpp
lib/StaticAnalyzer/Core/Store.cpp
lib/StaticAnalyzer/Core/SubEngine.cpp [new file with mode: 0644]
lib/StaticAnalyzer/Core/SymbolManager.cpp
utils/TableGen/TableGen.cpp

index 345cc945103dc581ff29afc8b0679b6b0cbc7b1e..449e916eb1610e94b39109d55f673e798f24f9a1 100644 (file)
@@ -112,6 +112,7 @@ public:
 };
 
 class InheritableAttr : public Attr {
+  virtual void anchor();
 protected:
   InheritableAttr(attr::Kind AK, SourceRange R)
     : Attr(AK, R) {}
@@ -127,6 +128,7 @@ public:
 };
 
 class InheritableParamAttr : public InheritableAttr {
+  virtual void anchor();
 protected:
   InheritableParamAttr(attr::Kind AK, SourceRange R)
     : InheritableAttr(AK, R) {}
index 0a24b72560f5c33df063cd4bfff01ce9cbd8a762..6b97a5775a6ebcd5f3d43c9f313643d8dc432e3a 100644 (file)
@@ -67,6 +67,7 @@ public:
 
 /// TranslationUnitDecl - The top declaration context.
 class TranslationUnitDecl : public Decl, public DeclContext {
+  virtual void anchor();
   ASTContext &Ctx;
 
   /// The (most recently entered) anonymous namespace for this
@@ -99,6 +100,7 @@ public:
 /// NamedDecl - This represents a decl with a name.  Many decls have names such
 /// as ObjCMethodDecl, but not @class, etc.
 class NamedDecl : public Decl {
+  virtual void anchor();
   /// Name - The name of this declaration, which is typically a normal
   /// identifier but may also be a special kind of name (C++
   /// constructor, Objective-C selector, etc.)
@@ -320,6 +322,7 @@ inline raw_ostream &operator<<(raw_ostream &OS, const NamedDecl &ND) {
 /// location of the statement.  For GNU local labels (__label__), the decl
 /// location is where the __label__ is.
 class LabelDecl : public NamedDecl {
+  virtual void anchor();
   LabelStmt *TheStmt;
   /// LocStart - For normal labels, this is the same as the main declaration
   /// label, i.e., the location of the identifier; for GNU local labels,
@@ -355,6 +358,7 @@ public:
 
 /// NamespaceDecl - Represent a C++ namespace.
 class NamespaceDecl : public NamedDecl, public DeclContext {
+  virtual void anchor();
   bool IsInline : 1;
 
   /// LocStart - The starting location of the source range, pointing
@@ -498,6 +502,7 @@ public:
 /// an lvalue) a function (in which case it is a function designator) or
 /// an enum constant.
 class ValueDecl : public NamedDecl {
+  virtual void anchor();
   QualType DeclType;
 
 protected:
@@ -1137,6 +1142,7 @@ public:
 };
 
 class ImplicitParamDecl : public VarDecl {
+  virtual void anchor();
 public:
   static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC,
                                    SourceLocation IdLoc, IdentifierInfo *Id,
@@ -2140,6 +2146,7 @@ public:
 /// field injected from an anonymous union/struct into the parent scope.
 /// IndirectFieldDecl are always implicit.
 class IndirectFieldDecl : public ValueDecl {
+  virtual void anchor();
   NamedDecl **Chaining;
   unsigned ChainingSize;
 
@@ -2179,6 +2186,7 @@ public:
 /// TypeDecl - Represents a declaration of a type.
 ///
 class TypeDecl : public NamedDecl {
+  virtual void anchor();
   /// TypeForDecl - This indicates the Type object that represents
   /// this TypeDecl.  It is a cache maintained by
   /// ASTContext::getTypedefType, ASTContext::getTagDeclType, and
@@ -2220,6 +2228,7 @@ public:
 
 /// Base class for declarations which introduce a typedef-name.
 class TypedefNameDecl : public TypeDecl, public Redeclarable<TypedefNameDecl> {
+  virtual void anchor();
   /// UnderlyingType - This is the type the typedef is set to.
   TypeSourceInfo *TInfo;
 
@@ -2547,6 +2556,7 @@ public:
 /// EnumDecl - Represents an enum.  As an extension, we allow forward-declared
 /// enums.
 class EnumDecl : public TagDecl {
+  virtual void anchor();
   /// IntegerType - This represent the integer type that the enum corresponds
   /// to for code generation purposes.  Note that the enumerator constants may
   /// have a different type than this does.
@@ -2866,6 +2876,7 @@ private:
 };
 
 class FileScopeAsmDecl : public Decl {
+  virtual void anchor();
   StringLiteral *AsmString;
   SourceLocation RParenLoc;
   FileScopeAsmDecl(DeclContext *DC, StringLiteral *asmstring,
index c8a703f38f6463680e8de8e724a69232c13d8a8b..7c040e7d2e38160790ee68fe13e2833217ed7f35 100644 (file)
@@ -104,6 +104,7 @@ namespace clang {
 /// Also note that this class has nothing to do with so-called
 /// "access declarations" (C++98 11.3 [class.access.dcl]).
 class AccessSpecDecl : public Decl {
+  virtual void anchor();
   /// ColonLoc - The location of the ':'.
   SourceLocation ColonLoc;
 
@@ -1316,6 +1317,7 @@ public:
 /// CXXMethodDecl - Represents a static or instance method of a
 /// struct/union/class.
 class CXXMethodDecl : public FunctionDecl {
+  virtual void anchor();
 protected:
   CXXMethodDecl(Kind DK, CXXRecordDecl *RD, SourceLocation StartLoc,
                 const DeclarationNameInfo &NameInfo,
@@ -1325,9 +1327,9 @@ protected:
     : FunctionDecl(DK, RD, StartLoc, NameInfo, T, TInfo,
                    (isStatic ? SC_Static : SC_None),
                    SCAsWritten, isInline, isConstexpr) {
-      if (EndLocation.isValid())
-        setRangeEnd(EndLocation);
-    }
+    if (EndLocation.isValid())
+      setRangeEnd(EndLocation);
+  }
 
 public:
   static CXXMethodDecl *Create(ASTContext &C, CXXRecordDecl *RD,
@@ -1690,6 +1692,7 @@ public:
 /// };
 /// @endcode
 class CXXConstructorDecl : public CXXMethodDecl {
+  virtual void anchor();
   /// IsExplicitSpecified - Whether this constructor declaration has the
   /// 'explicit' keyword specified.
   bool IsExplicitSpecified : 1;
@@ -1918,6 +1921,7 @@ public:
 /// };
 /// @endcode
 class CXXDestructorDecl : public CXXMethodDecl {
+  virtual void anchor();
   /// ImplicitlyDefined - Whether this destructor was implicitly
   /// defined by the compiler. When false, the destructor was defined
   /// by the user. In C++03, this flag will have the same value as
@@ -1989,6 +1993,7 @@ public:
 /// };
 /// @endcode
 class CXXConversionDecl : public CXXMethodDecl {
+  virtual void anchor();
   /// IsExplicitSpecified - Whether this conversion function declaration is
   /// marked "explicit", meaning that it can only be applied when the user
   /// explicitly wrote a cast. This is a C++0x feature.
@@ -2045,6 +2050,7 @@ public:
 ///   extern "C" void foo();
 ///
 class LinkageSpecDecl : public Decl, public DeclContext {
+  virtual void anchor();
 public:
   /// LanguageIDs - Used to represent the language in a linkage
   /// specification.  The values are part of the serialization abi for
@@ -2117,9 +2123,10 @@ public:
 ///    using namespace std;
 ///
 // NB: UsingDirectiveDecl should be Decl not NamedDecl, but we provide
-// artificial name, for all using-directives in order to store
+// artificial names for all using-directives in order to store
 // them in DeclContext effectively.
 class UsingDirectiveDecl : public NamedDecl {
+  virtual void anchor();
   /// \brief The location of the "using" keyword.
   SourceLocation UsingLoc;
 
@@ -2219,6 +2226,8 @@ public:
 /// namespace Foo = Bar;
 /// @endcode
 class NamespaceAliasDecl : public NamedDecl {
+  virtual void anchor();
+
   /// \brief The location of the "namespace" keyword.
   SourceLocation NamespaceLoc;
 
@@ -2308,6 +2317,8 @@ public:
 /// }
 ///
 class UsingShadowDecl : public NamedDecl {
+  virtual void anchor();
+
   /// The referenced declaration.
   NamedDecl *Underlying;
 
@@ -2367,6 +2378,8 @@ public:
 /// UsingDecl - Represents a C++ using-declaration. For example:
 ///    using someNameSpace::someIdentifier;
 class UsingDecl : public NamedDecl {
+  virtual void anchor();
+
   /// \brief The source location of the "using" location itself.
   SourceLocation UsingLocation;
 
@@ -2497,6 +2510,8 @@ public:
 ///   using Base<T>::foo;
 /// };
 class UnresolvedUsingValueDecl : public ValueDecl {
+  virtual void anchor();
+
   /// \brief The source location of the 'using' keyword
   SourceLocation UsingLocation;
 
@@ -2564,6 +2579,8 @@ public:
 /// The type associated with a unresolved using typename decl is
 /// currently always a typename type.
 class UnresolvedUsingTypenameDecl : public TypeDecl {
+  virtual void anchor();
+
   /// \brief The source location of the 'using' keyword
   SourceLocation UsingLocation;
 
@@ -2612,6 +2629,7 @@ public:
 
 /// StaticAssertDecl - Represents a C++0x static_assert declaration.
 class StaticAssertDecl : public Decl {
+  virtual void anchor();
   Expr *AssertExpr;
   StringLiteral *Message;
   SourceLocation RParenLoc;
index b84e5bba86b7e47c97d552c6d8e992578fa26939..07f696a4df70241df7549ba7901b95d85ff5dabb 100644 (file)
@@ -35,6 +35,7 @@ namespace clang {
 ///
 /// The semantic context of a friend decl is its declaring class.
 class FriendDecl : public Decl {
+  virtual void anchor();
 public:
   typedef llvm::PointerUnion<NamedDecl*,TypeSourceInfo*> FriendUnion;
 
index 6a0b6acc87dd55015e1552fc0a12dd0dd96ef2fe..8cc6e7374dd9fb35f92b4193849971f4f76ee9d4 100644 (file)
@@ -426,6 +426,8 @@ public:
 /// ObjCProtocolDecl, and ObjCImplDecl.
 ///
 class ObjCContainerDecl : public NamedDecl, public DeclContext {
+  virtual void anchor();
+
   SourceLocation AtStart;
 
   // These two locations in the range mark the end of the method container.
@@ -542,6 +544,8 @@ public:
 ///
 class ObjCInterfaceDecl : public ObjCContainerDecl
                         , public Redeclarable<ObjCInterfaceDecl> {
+  virtual void anchor();
+
   /// TypeForDecl - This indicates the Type object that represents this
   /// TypeDecl.  It is a cache maintained by ASTContext::getObjCInterfaceType
   mutable const Type *TypeForDecl;
@@ -949,6 +953,8 @@ public:
 ///   }
 ///
 class ObjCIvarDecl : public FieldDecl {
+  virtual void anchor();
+
 public:
   enum AccessControl {
     None, Private, Protected, Public, Package
@@ -1010,7 +1016,7 @@ private:
 /// ObjCAtDefsFieldDecl - Represents a field declaration created by an
 ///  @defs(...).
 class ObjCAtDefsFieldDecl : public FieldDecl {
-private:
+  virtual void anchor();
   ObjCAtDefsFieldDecl(DeclContext *DC, SourceLocation StartLoc,
                       SourceLocation IdLoc, IdentifierInfo *Id,
                       QualType T, Expr *BW)
@@ -1055,6 +1061,8 @@ public:
 /// id <NSDraggingInfo> anyObjectThatImplementsNSDraggingInfo;
 ///
 class ObjCProtocolDecl : public ObjCContainerDecl {
+  virtual void anchor();
+
   /// Referenced protocols
   ObjCProtocolList ReferencedProtocols;
 
@@ -1173,6 +1181,8 @@ public:
 /// @protocol NSTextInput, NSChangeSpelling, NSDraggingInfo;
 ///
 class ObjCForwardProtocolDecl : public Decl {
+  virtual void anchor();
+
   ObjCProtocolList ReferencedProtocols;
 
   ObjCForwardProtocolDecl(DeclContext *DC, SourceLocation L,
@@ -1232,6 +1242,8 @@ public:
 /// don't support this level of dynamism, which is both powerful and dangerous.
 ///
 class ObjCCategoryDecl : public ObjCContainerDecl {
+  virtual void anchor();
+
   /// Interface belonging to this category
   ObjCInterfaceDecl *ClassInterface;
 
@@ -1328,6 +1340,8 @@ public:
 };
 
 class ObjCImplDecl : public ObjCContainerDecl {
+  virtual void anchor();
+
   /// Class interface for this class/category implementation
   ObjCInterfaceDecl *ClassInterface;
 
@@ -1391,6 +1405,8 @@ public:
 ///
 /// ObjCCategoryImplDecl
 class ObjCCategoryImplDecl : public ObjCImplDecl {
+  virtual void anchor();
+
   // Category name
   IdentifierInfo *Id;
 
@@ -1479,6 +1495,7 @@ raw_ostream &operator<<(raw_ostream &OS,
 /// specified, they need to be *identical* to the interface.
 ///
 class ObjCImplementationDecl : public ObjCImplDecl {
+  virtual void anchor();
   /// Implementation Class's super class.
   ObjCInterfaceDecl *SuperClass;
   /// Support for ivar initialization.
@@ -1609,6 +1626,7 @@ raw_ostream &operator<<(raw_ostream &OS,
 /// ObjCCompatibleAliasDecl - Represents alias of a class. This alias is
 /// declared as @compatibility_alias alias class.
 class ObjCCompatibleAliasDecl : public NamedDecl {
+  virtual void anchor();
   /// Class that this is an alias of.
   ObjCInterfaceDecl *AliasedClass;
 
@@ -1635,6 +1653,7 @@ public:
 /// @property (assign, readwrite) int MyProperty;
 ///
 class ObjCPropertyDecl : public NamedDecl {
+  virtual void anchor();
 public:
   enum PropertyAttributeKind {
     OBJC_PR_noattr    = 0x00,
index 9149850e8fac18a8d867b158e29526622b54f762..f6bc41a640e890ed3b3510a6c0e1f1ef7dd9d9c7 100644 (file)
@@ -198,6 +198,7 @@ public:
 /// parameters and a reference to the templated scoped declaration: the
 /// underlying AST node.
 class TemplateDecl : public NamedDecl {
+  virtual void anchor();
 protected:
   // This is probably never used.
   TemplateDecl(Kind DK, DeclContext *DC, SourceLocation L,
@@ -1201,6 +1202,7 @@ public:
 /// name of a template and the template parameters allowable for substitution.
 class TemplateTemplateParmDecl
   : public TemplateDecl, protected TemplateParmPosition {
+  virtual void anchor();
 
   /// DefaultArgument - The default template argument, if any.
   TemplateArgumentLoc DefaultArgument;
@@ -1561,6 +1563,8 @@ public:
 
 class ClassTemplatePartialSpecializationDecl
   : public ClassTemplateSpecializationDecl {
+  virtual void anchor();
+
   /// \brief The list of template parameters
   TemplateParameterList* TemplateParams;
 
@@ -1941,6 +1945,7 @@ public:
 /// NOTE: This class is not currently in use.  All of the above
 /// will yield a FriendDecl, not a FriendTemplateDecl.
 class FriendTemplateDecl : public Decl {
+  virtual void anchor();
 public:
   typedef llvm::PointerUnion<NamedDecl*,TypeSourceInfo*> FriendUnion;
 
@@ -2107,7 +2112,8 @@ public:
 /// CXXMethodDecl. Then during an instantiation of class A, it will be
 /// transformed into an actual function specialization.
 class ClassScopeFunctionSpecializationDecl : public Decl {
-private:
+  virtual void anchor();
+
   ClassScopeFunctionSpecializationDecl(DeclContext *DC, SourceLocation Loc,
                                        CXXMethodDecl *FD)
     : Decl(Decl::ClassScopeFunctionSpecialization, DC, Loc),
index 4ea1ef4aa96a160a72642a226faad396d5c2a768..9d07e051ad5efeab05c83a82fcdc629cdc6ab981 100644 (file)
@@ -1643,6 +1643,8 @@ public:
 /// __array_rank(int[10][20]) == 2
 /// __array_extent(int, 1)    == 20
 class ArrayTypeTraitExpr : public Expr {
+  virtual void anchor();
+
   /// ATT - The trait. An ArrayTypeTrait enum in MSVC compat unsigned.
   unsigned ATT : 2;
 
index f58a83b54b6bfc3bb370eadaf618cb40d911a6ca..5a42aec0dc65416b033e34a722385b83a66e2946 100644 (file)
@@ -64,6 +64,8 @@ private:
 /// MangleContext - Context for tracking state which persists across multiple
 /// calls to the C++ name mangler.
 class MangleContext {
+  virtual void anchor();
+
   ASTContext &Context;
   DiagnosticsEngine &Diags;
 
index a9b80593d1e322562f4049250934fe58205feb92..e9a431a991a120815c945dc88644f8ddf9acf6b1 100644 (file)
@@ -31,6 +31,7 @@ typedef llvm::DomTreeNodeBase<CFGBlock> DomTreeNode;
 /// This class implements the dominators tree functionality given a Clang CFG.
 ///
 class DominatorTree : public ManagedAnalysis {
+  virtual void anchor();
 public:
   llvm::DominatorTreeBase<CFGBlock>* DT;
 
@@ -155,7 +156,7 @@ private:
   CFG *cfg;
 };
 
-void WriteAsOperand(raw_ostream &OS, const CFGBlock *BB,
+inline void WriteAsOperand(raw_ostream &OS, const CFGBlock *BB,
                           bool t) {
   OS << "BB#" << BB->getBlockID();
 }
index 42e56b26e028ccb55cb17476ae26df0a5756397f..c9f39b46b98e5dbe3f7a47aa7d08f9ff2ccd277c 100644 (file)
@@ -52,7 +52,9 @@ public:
     friend class LiveVariables;    
   };
   
-  struct Observer {
+  class Observer {
+    virtual void anchor();
+  public:
     virtual ~Observer() {}
     
     /// A callback invoked right before invoking the
index 57db39805492b6abd05bde160719d68e86c30a29..4e3244e7b7ca9ff712beeef0cb4edbf5cfb3e1ac 100644 (file)
@@ -27,6 +27,7 @@
 namespace clang {
 
 class PostOrderCFGView : public ManagedAnalysis {
+  virtual void anchor();
 public:
   /// \brief Implements a set of CFGBlocks using a BitVector.
   ///
index a5dba6eefe233714d414b022d1dcad78c2e9a387..30c5b2d7a5b25d94766a34891d22e75dbb700656 100644 (file)
@@ -37,6 +37,7 @@ namespace clang {
 namespace reachable_code {
 
 class Callback {
+  virtual void anchor();
 public:
   virtual ~Callback() {}
   virtual void HandleUnreachable(SourceLocation L, SourceRange R1,
index e6f30b17dc5b085fa14b35d04f5bbfdf293b76dd..0a785fd0a7187df288dc17723cdd1cdbe2324440 100644 (file)
@@ -1118,6 +1118,7 @@ public:
 /// IgnoringDiagConsumer - This is a diagnostic client that just ignores all
 /// diags.
 class IgnoringDiagConsumer : public DiagnosticConsumer {
+  virtual void anchor();
   void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
                         const Diagnostic &Info) {
     // Just ignore it.
index 77828b3ecb8ad5b66194da7d768be435302ea7d3..f27312fadef84acef50c5f985ab7cc80fb12a853 100644 (file)
@@ -25,6 +25,7 @@ namespace clang {
 /// system calls, which is used by precompiled and pretokenized headers to
 /// improve performance.
 class FileSystemStatCache {
+  virtual void anchor();
 protected:
   llvm::OwningPtr<FileSystemStatCache> NextStatCache;
   
index 9697bc62afd053cda0d8818a3ea156dfd53bc705..5c2e2bbe8d5283f877d78612cff72eede4f487e0 100644 (file)
@@ -63,31 +63,37 @@ public:
 };
 
 class EmitAssemblyAction : public CodeGenAction {
+  virtual void anchor();
 public:
   EmitAssemblyAction(llvm::LLVMContext *_VMContext = 0);
 };
 
 class EmitBCAction : public CodeGenAction {
+  virtual void anchor();
 public:
   EmitBCAction(llvm::LLVMContext *_VMContext = 0);
 };
 
 class EmitLLVMAction : public CodeGenAction {
+  virtual void anchor();
 public:
   EmitLLVMAction(llvm::LLVMContext *_VMContext = 0);
 };
 
 class EmitLLVMOnlyAction : public CodeGenAction {
+  virtual void anchor();
 public:
   EmitLLVMOnlyAction(llvm::LLVMContext *_VMContext = 0);
 };
 
 class EmitCodeGenOnlyAction : public CodeGenAction {
+  virtual void anchor();
 public:
   EmitCodeGenOnlyAction(llvm::LLVMContext *_VMContext = 0);
 };
 
 class EmitObjAction : public CodeGenAction {
+  virtual void anchor();
 public:
   EmitObjAction(llvm::LLVMContext *_VMContext = 0);
 };
index 38aba89002438b2eb86b97fb20ae0126d1278722..ba9d1f9305c385e710a744d1755a8fb3e4f5580f 100644 (file)
@@ -28,6 +28,7 @@ namespace clang {
   class CodeGenOptions;
 
   class CodeGenerator : public ASTConsumer {
+    virtual void anchor();
   public:
     virtual llvm::Module* GetModule() = 0;
     virtual llvm::Module* ReleaseModule() = 0;
index a33c33bf734c316ae6935196b4f5729456d504b9..41ce4d92c40ea6189737fd57e4cdc3d9dd1c424d 100644 (file)
@@ -94,6 +94,7 @@ public:
 };
 
 class InputAction : public Action {
+  virtual void anchor();
   const Arg &Input;
 public:
   InputAction(const Arg &_Input, types::ID _Type);
@@ -107,6 +108,7 @@ public:
 };
 
 class BindArchAction : public Action {
+  virtual void anchor();
   /// The architecture to bind, or 0 if the default architecture
   /// should be bound.
   const char *ArchName;
@@ -123,6 +125,7 @@ public:
 };
 
 class JobAction : public Action {
+  virtual void anchor();
 protected:
   JobAction(ActionClass Kind, Action *Input, types::ID Type);
   JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type);
@@ -136,6 +139,7 @@ public:
 };
 
 class PreprocessJobAction : public JobAction {
+  virtual void anchor();
 public:
   PreprocessJobAction(Action *Input, types::ID OutputType);
 
@@ -146,6 +150,7 @@ public:
 };
 
 class PrecompileJobAction : public JobAction {
+  virtual void anchor();
 public:
   PrecompileJobAction(Action *Input, types::ID OutputType);
 
@@ -156,6 +161,7 @@ public:
 };
 
 class AnalyzeJobAction : public JobAction {
+  virtual void anchor();
 public:
   AnalyzeJobAction(Action *Input, types::ID OutputType);
 
@@ -166,6 +172,7 @@ public:
 };
 
 class CompileJobAction : public JobAction {
+  virtual void anchor();
 public:
   CompileJobAction(Action *Input, types::ID OutputType);
 
@@ -176,6 +183,7 @@ public:
 };
 
 class AssembleJobAction : public JobAction {
+  virtual void anchor();
 public:
   AssembleJobAction(Action *Input, types::ID OutputType);
 
@@ -186,6 +194,7 @@ public:
 };
 
 class LinkJobAction : public JobAction {
+  virtual void anchor();
 public:
   LinkJobAction(ActionList &Inputs, types::ID Type);
 
@@ -196,6 +205,7 @@ public:
 };
 
 class LipoJobAction : public JobAction {
+  virtual void anchor();
 public:
   LipoJobAction(ActionList &Inputs, types::ID Type);
 
@@ -206,6 +216,7 @@ public:
 };
 
 class DsymutilJobAction : public JobAction {
+  virtual void anchor();
 public:
   DsymutilJobAction(ActionList &Inputs, types::ID Type);
 
@@ -216,6 +227,7 @@ public:
 };
 
 class VerifyJobAction : public JobAction {
+  virtual void anchor();
 public:
   VerifyJobAction(ActionList &Inputs, types::ID Type);
   static bool classof(const Action *A) {
index 367955f59f04913ed74d49facebaa78f1d312408..c94886dc26c15bf326d433ce7297956faab5dacf 100644 (file)
@@ -46,6 +46,8 @@ public:
   /// Command - An executable path/name and argument vector to
   /// execute.
 class Command : public Job {
+  virtual void anchor();
+
   /// Source - The action which caused the creation of this job.
   const Action &Source;
 
index b47fac52179e3e8144c7f3be4bcd7c4ac56c01cf..6ffcec51cfacf16978e5c45e24056a45827c366b 100644 (file)
@@ -21,6 +21,7 @@ class LangOptions;
 /// should be the "primary" client, and will be used for computing whether the
 /// diagnostics should be included in counts.
 class ChainedDiagnosticConsumer : public DiagnosticConsumer {
+  virtual void anchor();
   llvm::OwningPtr<DiagnosticConsumer> Primary;
   llvm::OwningPtr<DiagnosticConsumer> Secondary;
 
index f85cc7ec913cde57cf7d4f907cf34c26032468ad..b6ef9a5ed3ff536cd6df5cbc67545333c2a3f306 100644 (file)
@@ -231,6 +231,7 @@ public:
 };
 
 class PluginASTAction : public ASTFrontendAction {
+  virtual void anchor();
 protected:
   virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
                                          StringRef InFile) = 0;
index e01427f574d28cb169c9bb7a5df2df5fe716dcc8..0a62389b647c27f0114f1d9929ebc479f004b0dc 100644 (file)
@@ -44,6 +44,8 @@ enum ConflictMarkerKind {
 /// or buffering/seeking of tokens, only forward lexing is supported.  It relies
 /// on the specified Preprocessor object to handle preprocessor directives, etc.
 class Lexer : public PreprocessorLexer {
+  virtual void anchor();
+
   //===--------------------------------------------------------------------===//
   // Constant configuration values for this lexer.
   const char *BufferStart;       // Start of the buffer.
index 0c783d474dfd38bc91e214b2c4343b40e3471aad..19e8521ea128de5b3871974b8602560d0df9332a 100644 (file)
@@ -224,6 +224,7 @@ public:
 
 /// PPChainedCallbacks - Simple wrapper class for chaining callbacks.
 class PPChainedCallbacks : public PPCallbacks {
+  virtual void anchor();
   PPCallbacks *First, *Second;
 
 public:
index e2e30bf8783744538fbd9a3ad27d1fa1c587ce43..b551cd431018da8a3084cc1d063091aef0223e6a 100644 (file)
@@ -24,6 +24,7 @@ class FileEntry;
 class Preprocessor;
 
 class PreprocessorLexer {
+  virtual void anchor();
 protected:
   Preprocessor *PP;              // Preprocessor object controlling lexing.
 
index 3689a6e7a820c6a22c10a2e8b8bec2185f0300a6..139cce8d73651bf91778e1d9d046c8b7e8bc409d 100644 (file)
@@ -24,6 +24,7 @@ namespace clang {
   /// clients that read ASTs and then require further semantic
   /// analysis of the entities in those ASTs.
   class SemaConsumer : public ASTConsumer {
+    virtual void anchor();
   public:
     SemaConsumer() {
       ASTConsumer::SemaConsumer = true;
index bfb7ef8964ea25c8fee2f11cd8af1f77332596d9..633085527b998fa5ceaa5002315a90df97f0c0ec 100644 (file)
@@ -52,6 +52,7 @@ class BugType;
 class BugReport {
 public:
   class NodeResolver {
+    virtual void anchor();
   public:
     virtual ~NodeResolver() {}
     virtual const ExplodedNode*
@@ -374,6 +375,7 @@ public:
 };
 
 class BugReporterContext {
+  virtual void anchor();
   GRBugReporter &BR;
 public:
   BugReporterContext(GRBugReporter& br) : BR(br) {}
index 78067cd61c1e9fd28f9ee746b32c648fc2e23065..cb49122e4a53a4a78bfa4ea180fa386bef7a3689 100644 (file)
@@ -49,6 +49,7 @@ public:
 };
 
 class BuiltinBug : public BugType {
+  virtual void anchor();
   const std::string desc;
 public:
   BuiltinBug(const char *name, const char *description)
index 5a004746b78e5974619e74b6038f98f8c4464c0d..23a1635788e3088256ec618bf62cb4a5adf74b82 100644 (file)
@@ -46,6 +46,7 @@ class ExplodedNode;
 class PathDiagnostic;
 
 class PathDiagnosticConsumer {
+  virtual void anchor();
 public:
   PathDiagnosticConsumer() {}
 
index cb59268a6503972807d09df099d2deb14c2041bc..99408d7b33f6b61ebc495cf993adadc82f94f8ed 100644 (file)
@@ -383,6 +383,7 @@ class Checker<check::_VoidCheck, check::_VoidCheck, check::_VoidCheck,
                 check::_VoidCheck, check::_VoidCheck, check::_VoidCheck>
   : public CheckerBase 
 {
+  virtual void anchor();
 public:
   static void _register(void *checker, CheckerManager &mgr) { }
 };
index e6af93fbd1a025f321152c4781406ca04eb51ab1..d4408aef115b9be6da27a1311ce4e2a787aea834 100644 (file)
@@ -31,6 +31,7 @@ namespace ento {
   class CheckerManager;
 
 class AnalysisManager : public BugReporterData {
+  virtual void anchor();
   AnalysisDeclContextManager AnaCtxMgr;
 
   ASTContext &Ctx;
index 2079cdfaffb094897bcda1b50cdf2c6aaa3d75db..3a511821721337fa9048b194d360dd454d88f50e 100644 (file)
@@ -211,6 +211,7 @@ struct NodeBuilderContext {
 /// added to the builder (either as the input node set or as the newly
 /// constructed nodes) but did not have any outgoing transitions added.
 class NodeBuilder {
+  virtual void anchor();
 protected:
   const NodeBuilderContext &C;
 
@@ -305,6 +306,7 @@ public:
 /// \class NodeBuilderWithSinks
 /// \brief This node builder keeps track of the generated sink nodes.
 class NodeBuilderWithSinks: public NodeBuilder {
+  virtual void anchor();
 protected:
   SmallVector<ExplodedNode*, 2> sinksGenerated;
   ProgramPoint &Location;
@@ -381,6 +383,7 @@ public:
 /// \brief BranchNodeBuilder is responsible for constructing the nodes
 /// corresponding to the two branches of the if statement - true and false.
 class BranchNodeBuilder: public NodeBuilder {
+  virtual void anchor();
   const CFGBlock *DstT;
   const CFGBlock *DstF;
 
index f7ffd0af64b94d12c15f6934a904dd70cc331c73..dcaa9e5a2d54d06fc0403f9485361a8502219634 100644 (file)
@@ -228,6 +228,7 @@ private:
 
 // FIXME: Is this class necessary?
 class InterExplodedGraphMap {
+  virtual void anchor();
   llvm::DenseMap<const ExplodedNode*, ExplodedNode*> M;
   friend class ExplodedGraph;
 
index ced75982b706bb0edd3f448e40a2b78a9b38ae79..406cd5a94443527133277d92503599799e886a25 100644 (file)
@@ -177,6 +177,7 @@ public:
 };
   
 class GlobalsSpaceRegion : public MemSpaceRegion {
+  virtual void anchor();
 protected:
   GlobalsSpaceRegion(MemRegionManager *mgr, Kind k)
     : MemSpaceRegion(mgr, k) {}
@@ -223,6 +224,7 @@ public:
 };
   
 class HeapSpaceRegion : public MemSpaceRegion {
+  virtual void anchor();
   friend class MemRegionManager;
   
   HeapSpaceRegion(MemRegionManager *mgr)
@@ -234,6 +236,7 @@ public:
 };
   
 class UnknownSpaceRegion : public MemSpaceRegion {
+  virtual void anchor();
   friend class MemRegionManager;
   UnknownSpaceRegion(MemRegionManager *mgr)
     : MemSpaceRegion(mgr, UnknownSpaceRegionKind) {}
@@ -266,7 +269,7 @@ public:
 };
   
 class StackLocalsSpaceRegion : public StackSpaceRegion {
-private:
+  virtual void anchor();
   friend class MemRegionManager;
   StackLocalsSpaceRegion(MemRegionManager *mgr, const StackFrameContext *sfc)
     : StackSpaceRegion(mgr, StackLocalsSpaceRegionKind, sfc) {}
@@ -278,6 +281,7 @@ public:
 
 class StackArgumentsSpaceRegion : public StackSpaceRegion {
 private:
+  virtual void anchor();
   friend class MemRegionManager;
   StackArgumentsSpaceRegion(MemRegionManager *mgr, const StackFrameContext *sfc)
     : StackSpaceRegion(mgr, StackArgumentsSpaceRegionKind, sfc) {}
@@ -291,6 +295,8 @@ public:
 /// SubRegion - A region that subsets another larger region.  Most regions
 ///  are subclasses of SubRegion.
 class SubRegion : public MemRegion {
+private:
+  virtual void anchor();
 protected:
   const MemRegion* superRegion;
   SubRegion(const MemRegion* sReg, Kind k) : MemRegion(k), superRegion(sReg) {}
@@ -351,6 +357,8 @@ public:
 
 /// TypedRegion - An abstract class representing regions that are typed.
 class TypedRegion : public SubRegion {
+public:
+  virtual void anchor();
 protected:
   TypedRegion(const MemRegion* sReg, Kind k) : SubRegion(sReg, k) {}
 
@@ -371,6 +379,8 @@ public:
 
 /// TypedValueRegion - An abstract class representing regions having a typed value.
 class TypedValueRegion : public TypedRegion {
+public:
+  virtual void anchor();
 protected:
   TypedValueRegion(const MemRegion* sReg, Kind k) : TypedRegion(sReg, k) {}
 
@@ -399,6 +409,8 @@ public:
 
 
 class CodeTextRegion : public TypedRegion {
+public:
+  virtual void anchor();
 protected:
   CodeTextRegion(const MemRegion *sreg, Kind k) : TypedRegion(sreg, k) {}
 public:
index 5391f1a5852af131070b862338f927374d7bc812..700a26505bbda098c5c35c2c7a7819986618c571 100644 (file)
@@ -806,6 +806,7 @@ CB ProgramState::scanReachableSymbols(const MemRegion * const *beg,
 /// A Utility class that allows to visit the reachable symbols using a custom
 /// SymbolVisitor.
 class ScanReachableSymbols : public SubRegionMap::Visitor  {
+  virtual void anchor();
   typedef llvm::DenseMap<const void*, unsigned> VisitedItems;
 
   VisitedItems visited;
index 76df8c28e56dd3b6fd932fb6c2b326fda2dc201a..a44d2747b8e7a8c53dcd69be1d82dedb546ca512 100644 (file)
@@ -28,6 +28,7 @@ namespace ento {
 class ProgramState;
 
 class SValBuilder {
+  virtual void anchor();
 protected:
   ASTContext &Context;
   
index a688d7f21979948fc5a0ce3051b5cf566f7a5ddd..e7835dbab8d90f454f78b15eab4cc2f5a9608a37 100644 (file)
@@ -258,10 +258,12 @@ inline StoreRef &StoreRef::operator=(StoreRef const &newStore) {
 /// SubRegionMap - An abstract interface that represents a queryable map
 ///  between MemRegion objects and their subregions.
 class SubRegionMap {
+  virtual void anchor();
 public:
   virtual ~SubRegionMap() {}
 
   class Visitor {
+    virtual void anchor();
   public:
     virtual ~Visitor() {}
     virtual bool Visit(const MemRegion* Parent, const MemRegion* SubRegion) = 0;
index 8732addce456ab2e0c72b65bcb6e8ee13291e557..f2fa8fc9e90b8537322a77ec780b6c42e594f6ce 100644 (file)
@@ -43,6 +43,7 @@ class NodeBuilderWithSinks;
 class MemRegion;
 
 class SubEngine {
+  virtual void anchor();
 public:
   virtual ~SubEngine() {}
 
index 2a56c541ee9713871bc794108b810d9c59cfeb8a..5a5506f5e6d1f82a446813ae909ce31860720cde 100644 (file)
@@ -43,6 +43,7 @@ namespace ento {
 /// \brief Symbolic value. These values used to capture symbolic execution of
 /// the program.
 class SymExpr : public llvm::FoldingSetNode {
+  virtual void anchor();
 public:
   enum Kind { RegionValueKind, ConjuredKind, DerivedKind, ExtentKind,
               MetadataKind,
@@ -102,7 +103,7 @@ typedef unsigned SymbolID;
 /// \brief A symbol representing data which can be stored in a memory location
 /// (region).
 class SymbolData : public SymExpr {
-private:
+  virtual void anchor();
   const SymbolID Sym;
 
 protected:
index 3ca7d4d01d1cb13b8167b6a891f49ff5aa57d50f..cffcc6501eff65f14ae43affffb1ab55a220a272 100644 (file)
@@ -19,4 +19,8 @@ using namespace clang;
 
 Attr::~Attr() { }
 
+void InheritableAttr::anchor() { }
+
+void InheritableParamAttr::anchor() { }
+
 #include "clang/AST/AttrImpl.inc"
index 305c41c51c46ba932ba2a75de126f2baca7b1969..9028a09bc39179abafd4fbb058acca4b8080529d 100644 (file)
@@ -624,6 +624,8 @@ static void clearLinkageForClass(const CXXRecordDecl *record) {
   }
 }
 
+void NamedDecl::anchor() { }
+
 void NamedDecl::ClearLinkageCache() {
   // Note that we can't skip clearing the linkage of children just
   // because the parent doesn't have cached linkage:  we don't cache
@@ -2424,6 +2426,8 @@ void TagDecl::setTemplateParameterListsInfo(ASTContext &Context,
 // EnumDecl Implementation
 //===----------------------------------------------------------------------===//
 
+void EnumDecl::anchor() { }
+
 EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC,
                            SourceLocation StartLoc, SourceLocation IdLoc,
                            IdentifierInfo *Id,
@@ -2587,10 +2591,14 @@ SourceRange BlockDecl::getSourceRange() const {
 // Other Decl Allocation/Deallocation Method Implementations
 //===----------------------------------------------------------------------===//
 
+void TranslationUnitDecl::anchor() { }
+
 TranslationUnitDecl *TranslationUnitDecl::Create(ASTContext &C) {
   return new (C) TranslationUnitDecl(C);
 }
 
+void LabelDecl::anchor() { }
+
 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC,
                              SourceLocation IdentL, IdentifierInfo *II) {
   return new (C) LabelDecl(DC, IdentL, II, 0, IdentL);
@@ -2603,6 +2611,7 @@ LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC,
   return new (C) LabelDecl(DC, IdentL, II, 0, GnuLabelL);
 }
 
+void NamespaceDecl::anchor() { }
 
 NamespaceDecl *NamespaceDecl::Create(ASTContext &C, DeclContext *DC,
                                      SourceLocation StartLoc,
@@ -2615,6 +2624,10 @@ NamespaceDecl *NamespaceDecl::getNextNamespace() {
                        NextNamespace.get(getASTContext().getExternalSource()));
 }
 
+void ValueDecl::anchor() { }
+
+void ImplicitParamDecl::anchor() { }
+
 ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC,
                                              SourceLocation IdLoc,
                                              IdentifierInfo *Id,
@@ -2649,6 +2662,8 @@ EnumConstantDecl *EnumConstantDecl::Create(ASTContext &C, EnumDecl *CD,
   return new (C) EnumConstantDecl(CD, L, Id, T, E, V);
 }
 
+void IndirectFieldDecl::anchor() { }
+
 IndirectFieldDecl *
 IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
                           IdentifierInfo *Id, QualType T, NamedDecl **CH,
@@ -2663,12 +2678,16 @@ SourceRange EnumConstantDecl::getSourceRange() const {
   return SourceRange(getLocation(), End);
 }
 
+void TypeDecl::anchor() { }
+
 TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC,
                                  SourceLocation StartLoc, SourceLocation IdLoc,
                                  IdentifierInfo *Id, TypeSourceInfo *TInfo) {
   return new (C) TypedefDecl(DC, StartLoc, IdLoc, Id, TInfo);
 }
 
+void TypedefNameDecl::anchor() { }
+
 TypeAliasDecl *TypeAliasDecl::Create(ASTContext &C, DeclContext *DC,
                                      SourceLocation StartLoc,
                                      SourceLocation IdLoc, IdentifierInfo *Id,
@@ -2692,6 +2711,8 @@ SourceRange TypeAliasDecl::getSourceRange() const {
   return SourceRange(getLocStart(), RangeEnd);
 }
 
+void FileScopeAsmDecl::anchor() { }
+
 FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC,
                                            StringLiteral *Str,
                                            SourceLocation AsmLoc,
index b86cf281188b7fab3191968ded52429e3c7d34fc..ddb61e59502a1b9383f1c9636b045560ff32218b 100644 (file)
@@ -28,6 +28,8 @@ using namespace clang;
 // Decl Allocation/Deallocation Method Implementations
 //===----------------------------------------------------------------------===//
 
+void AccessSpecDecl::anchor() { }
+
 CXXRecordDecl::DefinitionData::DefinitionData(CXXRecordDecl *D)
   : UserDeclaredConstructor(false), UserDeclaredCopyConstructor(false),
     UserDeclaredMoveConstructor(false), UserDeclaredCopyAssignment(false),
@@ -1155,6 +1157,8 @@ bool CXXRecordDecl::mayBeAbstract() const {
   return false;
 }
 
+void CXXMethodDecl::anchor() { }
+
 CXXMethodDecl *
 CXXMethodDecl::Create(ASTContext &C, CXXRecordDecl *RD,
                       SourceLocation StartLoc,
@@ -1404,6 +1408,8 @@ SourceRange CXXCtorInitializer::getSourceRange() const {
   return SourceRange(getSourceLocation(), getRParenLoc());
 }
 
+void CXXConstructorDecl::anchor() { }
+
 CXXConstructorDecl *
 CXXConstructorDecl::Create(ASTContext &C, EmptyShell Empty) {
   return new (C) CXXConstructorDecl(0, SourceLocation(), DeclarationNameInfo(),
@@ -1548,6 +1554,8 @@ CXXConstructorDecl::setInheritedConstructor(const CXXConstructorDecl *BaseCtor){
   addOverriddenMethod(BaseCtor);
 }
 
+void CXXDestructorDecl::anchor() { }
+
 CXXDestructorDecl *
 CXXDestructorDecl::Create(ASTContext &C, EmptyShell Empty) {
   return new (C) CXXDestructorDecl(0, SourceLocation(), DeclarationNameInfo(),
@@ -1567,6 +1575,8 @@ CXXDestructorDecl::Create(ASTContext &C, CXXRecordDecl *RD,
                                    isImplicitlyDeclared);
 }
 
+void CXXConversionDecl::anchor() { }
+
 CXXConversionDecl *
 CXXConversionDecl::Create(ASTContext &C, EmptyShell Empty) {
   return new (C) CXXConversionDecl(0, SourceLocation(), DeclarationNameInfo(),
@@ -1589,6 +1599,8 @@ CXXConversionDecl::Create(ASTContext &C, CXXRecordDecl *RD,
                                    EndLocation);
 }
 
+void LinkageSpecDecl::anchor() { }
+
 LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C,
                                          DeclContext *DC,
                                          SourceLocation ExternLoc,
@@ -1598,6 +1610,8 @@ LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C,
   return new (C) LinkageSpecDecl(DC, ExternLoc, LangLoc, Lang, RBraceLoc);
 }
 
+void UsingDirectiveDecl::anchor() { }
+
 UsingDirectiveDecl *UsingDirectiveDecl::Create(ASTContext &C, DeclContext *DC,
                                                SourceLocation L,
                                                SourceLocation NamespaceLoc,
@@ -1618,6 +1632,8 @@ NamespaceDecl *UsingDirectiveDecl::getNominatedNamespace() {
   return cast_or_null<NamespaceDecl>(NominatedNamespace);
 }
 
+void NamespaceAliasDecl::anchor() { }
+
 NamespaceAliasDecl *NamespaceAliasDecl::Create(ASTContext &C, DeclContext *DC,
                                                SourceLocation UsingLoc,
                                                SourceLocation AliasLoc,
@@ -1631,6 +1647,8 @@ NamespaceAliasDecl *NamespaceAliasDecl::Create(ASTContext &C, DeclContext *DC,
                                     QualifierLoc, IdentLoc, Namespace);
 }
 
+void UsingShadowDecl::anchor() { }
+
 UsingDecl *UsingShadowDecl::getUsingDecl() const {
   const UsingShadowDecl *Shadow = this;
   while (const UsingShadowDecl *NextShadow =
@@ -1639,6 +1657,8 @@ UsingDecl *UsingShadowDecl::getUsingDecl() const {
   return cast<UsingDecl>(Shadow->UsingOrNextShadow);
 }
 
+void UsingDecl::anchor() { }
+
 void UsingDecl::addShadowDecl(UsingShadowDecl *S) {
   assert(std::find(shadow_begin(), shadow_end(), S) == shadow_end() &&
          "declaration already in set");
@@ -1676,6 +1696,8 @@ UsingDecl *UsingDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation UL,
   return new (C) UsingDecl(DC, UL, QualifierLoc, NameInfo, IsTypeNameArg);
 }
 
+void UnresolvedUsingValueDecl::anchor() { }
+
 UnresolvedUsingValueDecl *
 UnresolvedUsingValueDecl::Create(ASTContext &C, DeclContext *DC,
                                  SourceLocation UsingLoc,
@@ -1685,6 +1707,8 @@ UnresolvedUsingValueDecl::Create(ASTContext &C, DeclContext *DC,
                                           QualifierLoc, NameInfo);
 }
 
+void UnresolvedUsingTypenameDecl::anchor() { }
+
 UnresolvedUsingTypenameDecl *
 UnresolvedUsingTypenameDecl::Create(ASTContext &C, DeclContext *DC,
                                     SourceLocation UsingLoc,
@@ -1697,6 +1721,8 @@ UnresolvedUsingTypenameDecl::Create(ASTContext &C, DeclContext *DC,
                                              TargetName.getAsIdentifierInfo());
 }
 
+void StaticAssertDecl::anchor() { }
+
 StaticAssertDecl *StaticAssertDecl::Create(ASTContext &C, DeclContext *DC,
                                            SourceLocation StaticAssertLoc,
                                            Expr *AssertExpr,
index 99bfe40c31f4ab440dd76d69d81eb54bb67cdbdf..e44333effae164000b58ca2f2f1dc2c516a990bf 100644 (file)
@@ -16,6 +16,8 @@
 #include "clang/AST/DeclTemplate.h"
 using namespace clang;
 
+void FriendDecl::anchor() { }
+
 FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC,
                                SourceLocation L,
                                FriendUnion Friend,
index 18be26def90560fef5bc6baefa46edd71dfd0e4b..2960b13d6de26f161ee9755950f4783ea7cc5c4d 100644 (file)
@@ -46,6 +46,8 @@ void ObjCProtocolList::set(ObjCProtocolDecl* const* InList, unsigned Elts,
 // ObjCInterfaceDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCContainerDecl::anchor() { }
+
 /// getIvarDecl - This method looks up an ivar in this ContextDecl.
 ///
 ObjCIvarDecl *
@@ -147,6 +149,8 @@ ObjCContainerDecl::FindPropertyDeclaration(IdentifierInfo *PropertyId) const {
   return 0;
 }
 
+void ObjCInterfaceDecl::anchor() { }
+
 /// FindPropertyVisibleInPrimaryClass - Finds declaration of the property
 /// with name 'PropertyId' in the primary class; including those in protocols
 /// (direct or indirect) used by the primary class.
@@ -876,6 +880,8 @@ bool ObjCInterfaceDecl::ClassImplementsProtocol(ObjCProtocolDecl *lProto,
 // ObjCIvarDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCIvarDecl::anchor() { }
+
 ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, ObjCContainerDecl *DC,
                                    SourceLocation StartLoc,
                                    SourceLocation IdLoc, IdentifierInfo *Id,
@@ -946,6 +952,8 @@ const ObjCInterfaceDecl *ObjCIvarDecl::getContainingInterface() const {
 // ObjCAtDefsFieldDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCAtDefsFieldDecl::anchor() { }
+
 ObjCAtDefsFieldDecl
 *ObjCAtDefsFieldDecl::Create(ASTContext &C, DeclContext *DC,
                              SourceLocation StartLoc,  SourceLocation IdLoc,
@@ -957,6 +965,8 @@ ObjCAtDefsFieldDecl
 // ObjCProtocolDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCProtocolDecl::anchor() { }
+
 ObjCProtocolDecl *ObjCProtocolDecl::Create(ASTContext &C, DeclContext *DC,
                                            IdentifierInfo *Id,
                                            SourceLocation nameLoc,
@@ -1026,6 +1036,8 @@ SourceRange ObjCClassDecl::getSourceRange() const {
 // ObjCForwardProtocolDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCForwardProtocolDecl::anchor() { }
+
 ObjCForwardProtocolDecl::
 ObjCForwardProtocolDecl(DeclContext *DC, SourceLocation L,
                         ObjCProtocolDecl *const *Elts, unsigned nElts,
@@ -1048,6 +1060,8 @@ ObjCForwardProtocolDecl::Create(ASTContext &C, DeclContext *DC,
 // ObjCCategoryDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCCategoryDecl::anchor() { }
+
 ObjCCategoryDecl *ObjCCategoryDecl::Create(ASTContext &C, DeclContext *DC,
                                            SourceLocation AtLoc, 
                                            SourceLocation ClassNameLoc,
@@ -1089,6 +1103,8 @@ void ObjCCategoryDecl::setImplementation(ObjCCategoryImplDecl *ImplD) {
 // ObjCCategoryImplDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCCategoryImplDecl::anchor() { }
+
 ObjCCategoryImplDecl *
 ObjCCategoryImplDecl::Create(ASTContext &C, DeclContext *DC,
                              IdentifierInfo *Id,
@@ -1108,6 +1124,8 @@ ObjCCategoryDecl *ObjCCategoryImplDecl::getCategoryDecl() const {
 }
 
 
+void ObjCImplDecl::anchor() { }
+
 void ObjCImplDecl::addPropertyImplementation(ObjCPropertyImplDecl *property) {
   // FIXME: The context should be correct before we get here.
   property->setLexicalDeclContext(this);
@@ -1170,6 +1188,8 @@ raw_ostream &clang::operator<<(raw_ostream &OS,
 // ObjCImplementationDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCImplementationDecl::anchor() { }
+
 ObjCImplementationDecl *
 ObjCImplementationDecl::Create(ASTContext &C, DeclContext *DC,
                                ObjCInterfaceDecl *ClassInterface,
@@ -1203,6 +1223,8 @@ raw_ostream &clang::operator<<(raw_ostream &OS,
 // ObjCCompatibleAliasDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCCompatibleAliasDecl::anchor() { }
+
 ObjCCompatibleAliasDecl *
 ObjCCompatibleAliasDecl::Create(ASTContext &C, DeclContext *DC,
                                 SourceLocation L,
@@ -1215,6 +1237,8 @@ ObjCCompatibleAliasDecl::Create(ASTContext &C, DeclContext *DC,
 // ObjCPropertyDecl
 //===----------------------------------------------------------------------===//
 
+void ObjCPropertyDecl::anchor() { }
+
 ObjCPropertyDecl *ObjCPropertyDecl::Create(ASTContext &C, DeclContext *DC,
                                            SourceLocation L,
                                            IdentifierInfo *Id,
index 558a4ccac96b7ac9480c13f4c4e2d0784b534f13..a2d5a2d70dcb187d23209a3fa66e83abbf0cc58d 100644 (file)
@@ -537,6 +537,8 @@ SourceLocation NonTypeTemplateParmDecl::getDefaultArgumentLoc() const {
 // TemplateTemplateParmDecl Method Implementations
 //===----------------------------------------------------------------------===//
 
+void TemplateTemplateParmDecl::anchor() { }
+
 TemplateTemplateParmDecl *
 TemplateTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
                                  SourceLocation L, unsigned D, unsigned P,
@@ -581,6 +583,12 @@ FunctionTemplateSpecializationInfo::Create(ASTContext &C, FunctionDecl *FD,
                                                     POI);
 }
 
+//===----------------------------------------------------------------------===//
+// TemplateDecl Implementation
+//===----------------------------------------------------------------------===//
+
+void TemplateDecl::anchor() { }
+
 //===----------------------------------------------------------------------===//
 // ClassTemplateSpecializationDecl Implementation
 //===----------------------------------------------------------------------===//
@@ -682,6 +690,8 @@ ClassTemplateSpecializationDecl::getSourceRange() const {
 //===----------------------------------------------------------------------===//
 // ClassTemplatePartialSpecializationDecl Implementation
 //===----------------------------------------------------------------------===//
+void ClassTemplatePartialSpecializationDecl::anchor() { }
+
 ClassTemplatePartialSpecializationDecl::
 ClassTemplatePartialSpecializationDecl(ASTContext &Context, TagKind TK,
                                        DeclContext *DC,
@@ -749,6 +759,8 @@ ClassTemplatePartialSpecializationDecl::Create(ASTContext &Context,
 // FriendTemplateDecl Implementation
 //===----------------------------------------------------------------------===//
 
+void FriendTemplateDecl::anchor() { }
+
 FriendTemplateDecl *FriendTemplateDecl::Create(ASTContext &Context,
                                                DeclContext *DC,
                                                SourceLocation L,
@@ -796,3 +808,8 @@ TypeAliasTemplateDecl::newCommon(ASTContext &C) {
   return CommonPtr;
 }
 
+//===----------------------------------------------------------------------===//
+// ClassScopeFunctionSpecializationDecl Implementation
+//===----------------------------------------------------------------------===//
+
+void ClassScopeFunctionSpecializationDecl::anchor() { }
index 1bbf8494fa22c1ce968962be3be662862f1685a1..285d38cbdf1604d4967aaddf971cc547ad441e08 100644 (file)
@@ -1023,4 +1023,4 @@ TemplateArgument SubstNonTypeTemplateParmPackExpr::getArgumentPack() const {
   return TemplateArgument(Arguments, NumArguments);
 }
 
-
+void ArrayTypeTraitExpr::anchor() { }
index 5cb8f47519ecaa09f8e524b2d065d75744008c2c..68e0098c1a45c29a6f2cd2e86745517d83123fd6 100644 (file)
@@ -59,6 +59,8 @@ static void checkMangleDC(const DeclContext *DC, const BlockDecl *BD) {
 
 }
 
+void MangleContext::anchor() { }
+
 void MangleContext::mangleGlobalBlock(const BlockDecl *BD,
                                       raw_ostream &Out) {
   Out << "__block_global_" << getBlockId(BD, false);
diff --git a/lib/Analysis/Dominators.cpp b/lib/Analysis/Dominators.cpp
new file mode 100644 (file)
index 0000000..0e02c6d
--- /dev/null
@@ -0,0 +1,14 @@
+//=- Dominators.cpp - Implementation of dominators tree for Clang CFG C++ -*-=//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Analysis/Analyses/Dominators.h"
+
+using namespace clang;
+
+void DominatorTree::anchor() { }
index 3a325009d4a2b8b3ded02e4775b012aa1abe2135..ff6607d51aa94469bb3f2104a869900f5cd642bf 100644 (file)
@@ -143,6 +143,8 @@ namespace {
   }
 }
 
+void LiveVariables::Observer::anchor() { }
+
 LiveVariables::LivenessValues
 LiveVariablesImpl::merge(LiveVariables::LivenessValues valsA,
                          LiveVariables::LivenessValues valsB) {  
index 311423f285ae1add07c8bafe8d50140f313df106..cfd66f7aa1f23ff149de78ac4332ccad07573302 100644 (file)
@@ -15,6 +15,8 @@
 
 using namespace clang;
 
+void PostOrderCFGView::anchor() { }
+
 PostOrderCFGView::PostOrderCFGView(const CFG *cfg) {
   Blocks.reserve(cfg->getNumBlockIDs());
   CFGBlockSet BSet(cfg);
index 62575f9f232589cacec4e6221682cf2eb3c9c314..bb63e2c184909b13b131a11bd42461de8e50f124 100644 (file)
@@ -251,7 +251,9 @@ void DeadCodeScan::reportDeadCode(const Stmt *S,
 }
 
 namespace clang { namespace reachable_code {
-  
+
+void Callback::anchor() { }  
+
 unsigned ScanReachableFromBlock(const CFGBlock *Start,
                                 llvm::BitVector &Reachable) {
   unsigned count = 0;
index 164357215900235cb9ff148c181b26814febc62b..67ea056417f6828bfb8b2c5d52faa8bd38ea4c02 100644 (file)
@@ -825,6 +825,8 @@ StoredDiagnostic::~StoredDiagnostic() { }
 ///  reported by DiagnosticsEngine.
 bool DiagnosticConsumer::IncludeInDiagnosticCounts() const { return true; }
 
+void IgnoringDiagConsumer::anchor() { }
+
 PartialDiagnostic::StorageAllocator::StorageAllocator() {
   for (unsigned I = 0; I != NumCached; ++I)
     FreeList[I] = Cached + I;
index c8b07af295da4eb2a0ea8496abf9deebb3aa7724..875d397a1dae7c8cd9c3c39f3ced451a4dd9bb2e 100644 (file)
@@ -28,6 +28,8 @@ using namespace clang;
 #define S_ISDIR(s) ((_S_IFDIR & s) !=0)
 #endif
 
+void FileSystemStatCache::anchor() { }
+
 /// FileSystemStatCache::get - Get the 'stat' information for the specified
 /// path, using the cache to accelerate it if possible.  This returns true if
 /// the path does not exist or false if it exists.
index 2ddcc3e5dc0b697fb83892c30e925b5244c10b18..eedfc57a10618d5b728af0834501cd880e20ed68 100644 (file)
@@ -33,6 +33,7 @@ using namespace llvm;
 
 namespace clang {
   class BackendConsumer : public ASTConsumer {
+    virtual void anchor();
     DiagnosticsEngine &Diags;
     BackendAction Action;
     const CodeGenOptions &CodeGenOpts;
@@ -180,6 +181,8 @@ namespace clang {
     void InlineAsmDiagHandler2(const llvm::SMDiagnostic &,
                                SourceLocation LocCookie);
   };
+  
+  void BackendConsumer::anchor() {}
 }
 
 /// ConvertBackendLocation - Convert a location in a temporary llvm::SourceMgr
@@ -406,20 +409,26 @@ void CodeGenAction::ExecuteAction() {
 
 //
 
+void EmitAssemblyAction::anchor() { }
 EmitAssemblyAction::EmitAssemblyAction(llvm::LLVMContext *_VMContext)
   : CodeGenAction(Backend_EmitAssembly, _VMContext) {}
 
+void EmitBCAction::anchor() { }
 EmitBCAction::EmitBCAction(llvm::LLVMContext *_VMContext)
   : CodeGenAction(Backend_EmitBC, _VMContext) {}
 
+void EmitLLVMAction::anchor() { }
 EmitLLVMAction::EmitLLVMAction(llvm::LLVMContext *_VMContext)
   : CodeGenAction(Backend_EmitLL, _VMContext) {}
 
+void EmitLLVMOnlyAction::anchor() { }
 EmitLLVMOnlyAction::EmitLLVMOnlyAction(llvm::LLVMContext *_VMContext)
   : CodeGenAction(Backend_EmitNothing, _VMContext) {}
 
+void EmitCodeGenOnlyAction::anchor() { }
 EmitCodeGenOnlyAction::EmitCodeGenOnlyAction(llvm::LLVMContext *_VMContext)
   : CodeGenAction(Backend_EmitMCNull, _VMContext) {}
 
+void EmitObjAction::anchor() { }
 EmitObjAction::EmitObjAction(llvm::LLVMContext *_VMContext)
   : CodeGenAction(Backend_EmitObj, _VMContext) {}
index 30572ed9af24c6366889ade447a81753237469c2..8aa788d9a154f877712ffc7f45f8da3ac3a65fee 100644 (file)
@@ -113,6 +113,8 @@ namespace {
   };
 }
 
+void CodeGenerator::anchor() { }
+
 CodeGenerator *clang::CreateLLVMCodeGen(DiagnosticsEngine &Diags,
                                         const std::string& ModuleName,
                                         const CodeGenOptions &CGO,
index 52c0dbb5f1735635dd056b06df6cfdb8baaa5a6d..a9dc17b320f880095f06a2bc613edc7bafe7e17b 100644 (file)
@@ -38,14 +38,20 @@ const char *Action::getClassName(ActionClass AC) {
   llvm_unreachable("invalid class");
 }
 
+void InputAction::anchor() {}
+
 InputAction::InputAction(const Arg &_Input, types::ID _Type)
   : Action(InputClass, _Type), Input(_Input) {
 }
 
+void BindArchAction::anchor() {}
+
 BindArchAction::BindArchAction(Action *Input, const char *_ArchName)
   : Action(BindArchClass, Input, Input->getType()), ArchName(_ArchName) {
 }
 
+void JobAction::anchor() {}
+
 JobAction::JobAction(ActionClass Kind, Action *Input, types::ID Type)
   : Action(Kind, Input, Type) {
 }
@@ -54,38 +60,56 @@ JobAction::JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type)
   : Action(Kind, Inputs, Type) {
 }
 
+void PreprocessJobAction::anchor() {}
+
 PreprocessJobAction::PreprocessJobAction(Action *Input, types::ID OutputType)
   : JobAction(PreprocessJobClass, Input, OutputType) {
 }
 
+void PrecompileJobAction::anchor() {}
+
 PrecompileJobAction::PrecompileJobAction(Action *Input, types::ID OutputType)
   : JobAction(PrecompileJobClass, Input, OutputType) {
 }
 
+void AnalyzeJobAction::anchor() {}
+
 AnalyzeJobAction::AnalyzeJobAction(Action *Input, types::ID OutputType)
   : JobAction(AnalyzeJobClass, Input, OutputType) {
 }
 
+void CompileJobAction::anchor() {}
+
 CompileJobAction::CompileJobAction(Action *Input, types::ID OutputType)
   : JobAction(CompileJobClass, Input, OutputType) {
 }
 
+void AssembleJobAction::anchor() {}
+
 AssembleJobAction::AssembleJobAction(Action *Input, types::ID OutputType)
   : JobAction(AssembleJobClass, Input, OutputType) {
 }
 
+void LinkJobAction::anchor() {}
+
 LinkJobAction::LinkJobAction(ActionList &Inputs, types::ID Type)
   : JobAction(LinkJobClass, Inputs, Type) {
 }
 
+void LipoJobAction::anchor() {}
+
 LipoJobAction::LipoJobAction(ActionList &Inputs, types::ID Type)
   : JobAction(LipoJobClass, Inputs, Type) {
 }
 
+void DsymutilJobAction::anchor() {}
+
 DsymutilJobAction::DsymutilJobAction(ActionList &Inputs, types::ID Type)
   : JobAction(DsymutilJobClass, Inputs, Type) {
 }
 
+void VerifyJobAction::anchor() {}
+
 VerifyJobAction::VerifyJobAction(ActionList &Inputs, types::ID Type)
   : JobAction(VerifyJobClass, Inputs, Type) {
 }
index 5443d70e825c124815b71873ebb5ec8ad0e3bbaf..825c86a826165e3e0c0ff62bc33f443d8a55be33 100644 (file)
@@ -16,6 +16,8 @@ using namespace clang::driver;
 
 Job::~Job() {}
 
+void Command::anchor() {}
+
 Command::Command(const Action &_Source, const Tool &_Creator,
                  const char *_Executable, const ArgStringList &_Arguments)
   : Job(CommandClass), Source(_Source), Creator(_Creator),
index 728255e3fbd9b62b77d853f29fe359a551827aa4..b53f2d338823c3b4b4e78e3060ca1cc7d7038b00 100644 (file)
@@ -192,6 +192,8 @@ std::string Darwin::ComputeEffectiveClangTriple(const ArgList &Args,
   return Triple.getTriple();
 }
 
+void Generic_ELF::anchor() {}
+
 Tool &Darwin::SelectTool(const Compilation &C, const JobAction &JA,
                          const ActionList &Inputs) const {
   Action::ActionClass Key;
index 6772477eb49e883108605d4f5d1988d522d273b7..c0860c5263bb542df5e74fa4f341f7b4d7da3733 100644 (file)
@@ -423,7 +423,8 @@ public:
 };
 
 class LLVM_LIBRARY_VISIBILITY Generic_ELF : public Generic_GCC {
- public:
+  virtual void anchor();
+public:
   Generic_ELF(const HostInfo &Host, const llvm::Triple& Triple)
     : Generic_GCC(Host, Triple) {}
 
index c8f99c4f91d03ac4d463e423a32bd5d11d86c207..d99b4f2fced6be7bdbf7a27a84727aa746f2fe15 100644 (file)
@@ -2865,6 +2865,8 @@ const char *darwin::CC1::getCC1Name(types::ID Type) const {
   }
 }
 
+void darwin::CC1::anchor() {}
+
 const char *darwin::CC1::getBaseInputName(const ArgList &Args,
                                           const InputInfoList &Inputs) {
   return Args.MakeArgString(
@@ -3509,6 +3511,8 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
   C.addCommand(new Command(JA, *this, Exec, CmdArgs));
 }
 
+void darwin::DarwinTool::anchor() {}
+
 void darwin::DarwinTool::AddDarwinArch(const ArgList &Args,
                                        ArgStringList &CmdArgs) const {
   StringRef ArchName = getDarwinToolChain().getDarwinArchName(Args);
index c06e22b1d55e79aa3cac24c5c69fd77900fba377..b304e9626afa5b08d5f1a0bb4590fd30ea34713b 100644 (file)
@@ -192,6 +192,7 @@ namespace hexagon {
 
 namespace darwin {
   class LLVM_LIBRARY_VISIBILITY DarwinTool : public Tool {
+    virtual void anchor();
   protected:
     void AddDarwinArch(const ArgList &Args, ArgStringList &CmdArgs) const;
 
@@ -205,6 +206,7 @@ namespace darwin {
   };
 
   class LLVM_LIBRARY_VISIBILITY CC1 : public DarwinTool  {
+    virtual void anchor();
   public:
     static const char *getBaseInputName(const ArgList &Args,
                                  const InputInfoList &Input);
diff --git a/lib/Frontend/ChainedDiagnosticConsumer.cpp b/lib/Frontend/ChainedDiagnosticConsumer.cpp
new file mode 100644 (file)
index 0000000..c1d3db8
--- /dev/null
@@ -0,0 +1,14 @@
+//===- ChainedDiagnosticConsumer.cpp - Chain Diagnostic Clients -*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Frontend/ChainedDiagnosticConsumer.h"
+
+using namespace clang;
+
+void ChainedDiagnosticConsumer::anchor() { }
index 439a124f3bb6b6db6bb04cc07c30c6c246a16ffa..6ef07c447da0bcb2ffb84f8fa5e0936d4022a9b8 100644 (file)
@@ -411,6 +411,8 @@ void ASTFrontendAction::ExecuteAction() {
   ParseAST(CI.getSema(), CI.getFrontendOpts().ShowStats);
 }
 
+void PluginASTAction::anchor() { }
+
 ASTConsumer *
 PreprocessorFrontendAction::CreateASTConsumer(CompilerInstance &CI,
                                               StringRef InFile) {
index a9b11d69c9e5133893562791048a3cc4c4d2358c..25e320df51290a98ffc0303941727718b2b2cac4 100644 (file)
@@ -59,6 +59,8 @@ tok::ObjCKeywordKind Token::getObjCKeywordID() const {
 // Lexer Class Implementation
 //===----------------------------------------------------------------------===//
 
+void Lexer::anchor() { }
+
 void Lexer::InitLexer(const char *BufStart, const char *BufPtr,
                       const char *BufEnd) {
   InitCharacterInfo();
diff --git a/lib/Lex/PPCallbacks.cpp b/lib/Lex/PPCallbacks.cpp
new file mode 100644 (file)
index 0000000..952b926
--- /dev/null
@@ -0,0 +1,14 @@
+//===--- PPCallbacks.cpp - Callbacks for Preprocessor actions ---*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Lex/PPCallbacks.h"
+
+using namespace clang;
+
+void PPChainedCallbacks::anchor() { }
index 0da9ef5531e7f70e4c2500cf7775a5ed82aee213..a72bbca6bcff57d3e30a5aa92d5968669830334c 100644 (file)
@@ -17,6 +17,8 @@
 #include "clang/Basic/SourceManager.h"
 using namespace clang;
 
+void PreprocessorLexer::anchor() { }
+
 PreprocessorLexer::PreprocessorLexer(Preprocessor *pp, FileID fid)
   : PP(pp), FID(fid), InitialNumSLocEntries(0),
     ParsingPreprocessorDirective(false),
index 1f20924c9b7532a5893070035e714eed647e4a29..83b1ed0c3c213a93f715c4dd9c4a05ff6bf98e7c 100644 (file)
@@ -284,6 +284,9 @@ Decl *Parser::ParseObjCAtInterfaceDeclaration(SourceLocation AtLoc,
 /// The Objective-C property callback.  This should be defined where
 /// it's used, but instead it's been lifted to here to support VS2005.
 struct Parser::ObjCPropertyCallback : FieldCallback {
+private:
+  virtual void anchor();
+public:
   Parser &P;
   SmallVectorImpl<Decl *> &Props;
   ObjCDeclSpec &OCDS;
@@ -337,6 +340,9 @@ struct Parser::ObjCPropertyCallback : FieldCallback {
   }
 };
 
+void Parser::ObjCPropertyCallback::anchor() {
+}
+
 ///   objc-interface-decl-list:
 ///     empty
 ///     objc-interface-decl-list objc-property-decl [OBJC2]
index 1b7b2f029942182818e6916f7672df590042218a..3567b6bbe0680cd30a4c3817b6de3ef6faf4a23e 100644 (file)
@@ -634,6 +634,7 @@ struct SortDiagBySourceLocation {
   }
 };
 
+namespace {
 class ThreadSafetyReporter : public clang::thread_safety::ThreadSafetyHandler {
   Sema &S;
   DiagList Warnings;
@@ -744,6 +745,7 @@ class ThreadSafetyReporter : public clang::thread_safety::ThreadSafetyHandler {
 };
 }
 }
+}
 
 //===----------------------------------------------------------------------===//
 // AnalysisBasedWarnings - Worker object used by Sema to execute analysis-based
diff --git a/lib/Sema/SemaConsumer.cpp b/lib/Sema/SemaConsumer.cpp
new file mode 100644 (file)
index 0000000..d83a13e
--- /dev/null
@@ -0,0 +1,14 @@
+//===-- SemaConsumer.cpp - Abstract interface for AST semantics -*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Sema/SemaConsumer.h"
+
+using namespace clang;
+
+void SemaConsumer::anchor() { }
index 72aed742374b3d3cf20e80643ee67f29b1f3fdbc..af18eff89914f32e599ae8cfe0de51193f0461f6 100644 (file)
@@ -14,6 +14,8 @@
 using namespace clang;
 using namespace ento;
 
+void AnalysisManager::anchor() { }
+
 AnalysisManager::AnalysisManager(ASTContext &ctx, DiagnosticsEngine &diags,
                                  const LangOptions &lang,
                                  PathDiagnosticConsumer *pd,
index fbbdb040e4f277fdffa999ed0dc06c48fd0e4c09..8ef9c21913cb228f157942dd4238b30b09de837f 100644 (file)
@@ -34,6 +34,8 @@ using namespace ento;
 
 BugReporterVisitor::~BugReporterVisitor() {}
 
+void BugReporterContext::anchor() {}
+
 //===----------------------------------------------------------------------===//
 // Helper routines for walking the ExplodedGraph and fetching statements.
 //===----------------------------------------------------------------------===//
@@ -1204,10 +1206,14 @@ BugType::~BugType() { }
 
 void BugType::FlushReports(BugReporter &BR) {}
 
+void BuiltinBug::anchor() {}
+
 //===----------------------------------------------------------------------===//
 // Methods for BugReport and subclasses.
 //===----------------------------------------------------------------------===//
 
+void BugReport::NodeResolver::anchor() {}
+
 void BugReport::addVisitor(BugReporterVisitor* visitor) {
   if (!visitor)
     return;
index a3bf2c236f6e4fff00ea4daf7c752018c090dd54..f793c7fe29dfb4d73d0c9d582bd4df42c7ae2f36 100644 (file)
@@ -20,3 +20,11 @@ StringRef CheckerBase::getTagDescription() const {
   // FIXME: We want to return the package + name of the checker here.
   return "A Checker";  
 }
+
+void Checker<check::_VoidCheck, check::_VoidCheck, check::_VoidCheck,
+             check::_VoidCheck, check::_VoidCheck, check::_VoidCheck,
+             check::_VoidCheck, check::_VoidCheck, check::_VoidCheck,
+             check::_VoidCheck, check::_VoidCheck, check::_VoidCheck,
+             check::_VoidCheck, check::_VoidCheck, check::_VoidCheck,
+             check::_VoidCheck, check::_VoidCheck, check::_VoidCheck
+             >::anchor() { }
index 0b9371c4b5e2c9905d21382f4305078a3d66da55..bf4bf2db8861100069dcf4ef32da21dce6ff2524 100644 (file)
@@ -537,6 +537,8 @@ void CoreEngine::enqueueEndOfFunction(ExplodedNodeSet &Set) {
 }
 
 
+void NodeBuilder::anchor() { }
+
 ExplodedNode* NodeBuilder::generateNodeImpl(const ProgramPoint &Loc,
                                             const ProgramState *State,
                                             ExplodedNode *FromN,
@@ -556,6 +558,8 @@ ExplodedNode* NodeBuilder::generateNodeImpl(const ProgramPoint &Loc,
   return N;
 }
 
+void NodeBuilderWithSinks::anchor() { }
+
 StmtNodeBuilder::~StmtNodeBuilder() {
   if (EnclosingBldr)
     for (ExplodedNodeSet::iterator I = Frontier.begin(),
@@ -563,6 +567,8 @@ StmtNodeBuilder::~StmtNodeBuilder() {
       EnclosingBldr->addNodes(*I);
 }
 
+void BranchNodeBuilder::anchor() { }
+
 ExplodedNode *BranchNodeBuilder::generateNode(const ProgramState *State,
                                               bool branch,
                                               ExplodedNode *NodePred) {
index 7edcb752f708390f02cb3826f12dd7a5a0f444c4..691a82ed3c221362cbd3173245a3504290de6fcd 100644 (file)
@@ -379,6 +379,8 @@ ExplodedGraph::TrimInternal(const ExplodedNode* const* BeginSources,
   return G;
 }
 
+void InterExplodedGraphMap::anchor() { }
+
 ExplodedNode*
 InterExplodedGraphMap::getMappedNode(const ExplodedNode *N) const {
   llvm::DenseMap<const ExplodedNode*, ExplodedNode*>::const_iterator I =
index 2cc0607cb4a22165d6a415bf5dcb3c857fd68b8c..2ddaed5b054c41332fa12fb86a9ba20c4e646236 100644 (file)
@@ -383,6 +383,20 @@ void CXXBaseObjectRegion::Profile(llvm::FoldingSetNodeID &ID) const {
   ProfileRegion(ID, decl, superRegion);
 }
 
+//===----------------------------------------------------------------------===//
+// Region anchors.
+//===----------------------------------------------------------------------===//
+
+void GlobalsSpaceRegion::anchor() { }
+void HeapSpaceRegion::anchor() { }
+void UnknownSpaceRegion::anchor() { }
+void StackLocalsSpaceRegion::anchor() { }
+void StackArgumentsSpaceRegion::anchor() { }
+void TypedRegion::anchor() { }
+void TypedValueRegion::anchor() { }
+void CodeTextRegion::anchor() { }
+void SubRegion::anchor() { }
+
 //===----------------------------------------------------------------------===//
 // Region pretty-printing.
 //===----------------------------------------------------------------------===//
index 6c2f2ae46f2c0a76c7100ea00bf5e8871b762489..50ebe3b7466e09318b3ce8d6b5e67695a21069be 100644 (file)
@@ -82,6 +82,8 @@ PathDiagnostic::PathDiagnostic(StringRef bugtype, StringRef desc,
     Desc(StripTrailingDots(desc)),
     Category(StripTrailingDots(category)) {}
 
+void PathDiagnosticConsumer::anchor() { }
+
 void PathDiagnosticConsumer::HandlePathDiagnostic(const PathDiagnostic *D) {
   // For now this simply forwards to HandlePathDiagnosticImpl.  In the future
   // we can use this indirection to control for multi-threaded access to
index d4b31c1f517dc6c88f7d12e67258ab814e1bd2f6..eac9c1c99c1abb8737ab7c8234f593549ad1f3c2 100644 (file)
@@ -536,6 +536,8 @@ const ProgramState *ProgramStateManager::removeGDM(const ProgramState *state, vo
   return getPersistentState(NewState);
 }
 
+void ScanReachableSymbols::anchor() { }
+
 bool ScanReachableSymbols::scan(nonloc::CompoundVal val) {
   for (nonloc::CompoundVal::iterator I=val.begin(), E=val.end(); I!=E; ++I)
     if (!scan(*I))
index 7e7b034692b33c33885de50217cbd28aa069d70f..7fc947828f3f0c589636f53b4fe04183f0cb77f4 100644 (file)
@@ -25,6 +25,8 @@ using namespace ento;
 // Basic SVal creation.
 //===----------------------------------------------------------------------===//
 
+void SValBuilder::anchor() { }
+
 DefinedOrUnknownSVal SValBuilder::makeZeroVal(QualType type) {
   if (Loc::isLocType(type))
     return makeNull();
index fd3828fc29e6f1c2811f645bfc77cc615b71949b..825510e00b088351ce96d0039c57cabad2d6cddc 100644 (file)
@@ -331,3 +331,5 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset,
 
 StoreManager::BindingsHandler::~BindingsHandler() {}
 
+void SubRegionMap::anchor() { }
+void SubRegionMap::Visitor::anchor() { }
diff --git a/lib/StaticAnalyzer/Core/SubEngine.cpp b/lib/StaticAnalyzer/Core/SubEngine.cpp
new file mode 100644 (file)
index 0000000..350f4b8
--- /dev/null
@@ -0,0 +1,14 @@
+//== SubEngine.cpp - Interface of the subengine of CoreEngine ------*- C++ -*-//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h"
+
+using namespace clang::ento;
+
+void SubEngine::anchor() { }
index 6f5d8f90bbdbd9d41cd9fbe2dc0feae7878dcf91..d31dd06092dbd917410b9726c9466ee5f57b0b80 100644 (file)
@@ -21,6 +21,8 @@
 using namespace clang;
 using namespace ento;
 
+void SymExpr::anchor() { }
+
 void SymExpr::dump() const {
   dumpToStream(llvm::errs());
 }
@@ -99,6 +101,8 @@ void SymbolMetadata::dumpToStream(raw_ostream &os) const {
      << getRegion() << ',' << T.getAsString() << '}';
 }
 
+void SymbolData::anchor() { }
+
 void SymbolRegionValue::dumpToStream(raw_ostream &os) const {
   os << "reg_$" << getSymbolID() << "<" << R << ">";
 }
index 5c016d32ddd76fc2020927eb4aa011f45fd9e04c..56b28db4e28426b154599479be8a47f6cbe565ea 100644 (file)
@@ -96,7 +96,6 @@ namespace {
   ClangComponent("clang-component",
                  cl::desc("Only use warnings from specified component"),
                  cl::value_desc("component"), cl::Hidden);
-}
 
 class ClangTableGenAction : public TableGenAction {
 public:
@@ -165,6 +164,7 @@ public:
     return false;
   }
 };
+}
 
 int main(int argc, char **argv) {
   sys::PrintStackTraceOnErrorSignal();