]> granicus.if.org Git - clang/commitdiff
Delete dead code.
authorEli Friedman <eli.friedman@gmail.com>
Thu, 27 Jun 2013 20:48:08 +0000 (20:48 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 27 Jun 2013 20:48:08 +0000 (20:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185101 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ASTContext.h
include/clang/AST/Stmt.h
include/clang/AST/Type.h
include/clang/AST/VTableBuilder.h
lib/AST/ASTContext.cpp
lib/AST/Stmt.cpp
lib/AST/Type.cpp
lib/AST/VTableBuilder.cpp

index ea772647f93e68dbe98d989ebeef9e69b306a4f2..3f810f9a036744e9394ea9a9fc9b9cdbfacd324a 100644 (file)
@@ -1918,7 +1918,6 @@ public:
   bool isObjCSelType(QualType T) const {
     return T == getObjCSelType();
   }
-  bool QualifiedIdConformsQualifiedId(QualType LHS, QualType RHS);
   bool ObjCQualifiedIdTypesAreCompatible(QualType LHS, QualType RHS,
                                          bool ForCompare);
 
index 731a5d0b18bfe6cf5f3130a4c26559c6e8b3a5e2..dff9a1df758cda24aa7e1221d1959ce401636895 100644 (file)
@@ -397,13 +397,6 @@ public:
       const_cast<const Stmt*>(this)->stripLabelLikeStatements());
   }
 
-  /// hasImplicitControlFlow - Some statements (e.g. short circuited operations)
-  ///  contain implicit control-flow in the order their subexpressions
-  ///  are evaluated.  This predicate returns true if this statement has
-  ///  such implicit control-flow.  Such statements are also specially handled
-  ///  within CFGs.
-  bool hasImplicitControlFlow() const;
-
   /// Child Iterators: All subclasses must implement 'children'
   /// to permit easy iteration over the substatements/subexpessions of an
   /// AST node.  This permits easy iteration over all nodes in the AST.
index 2566268a626af556cd153fcb93ce7c122f9a927a..1133d126c3e0fa3d18c427dc797713df19d385c7 100644 (file)
@@ -1512,7 +1512,6 @@ public:
   bool isRealType() const;         // C99 6.2.5p17 (real floating + integer)
   bool isArithmeticType() const;   // C99 6.2.5p18 (integer + floating)
   bool isVoidType() const;         // C99 6.2.5p19
-  bool isDerivedType() const;      // C99 6.2.5p20
   bool isScalarType() const;       // C99 6.2.5p21 (arithmetic + pointers)
   bool isAggregateType() const;
   bool isFundamentalType() const;
@@ -3707,10 +3706,6 @@ class TemplateSpecializationType
 public:
   /// \brief Determine whether any of the given template arguments are
   /// dependent.
-  static bool anyDependentTemplateArguments(const TemplateArgument *Args,
-                                            unsigned NumArgs,
-                                            bool &InstantiationDependent);
-
   static bool anyDependentTemplateArguments(const TemplateArgumentLoc *Args,
                                             unsigned NumArgs,
                                             bool &InstantiationDependent);
index efd388dcfd911b908e9ee1cd76cec2b15fa75c9c..d445d74fa1e7d387b6013e3c37a42a2f8729684b 100644 (file)
@@ -267,8 +267,6 @@ public:
 };
 
 class VTableContext {
-  ASTContext &Context;
-
 public:
   typedef SmallVector<std::pair<uint64_t, ThunkInfo>, 1>
     VTableThunksTy;
@@ -306,10 +304,6 @@ private:
   /// given record decl.
   void ComputeVTableRelatedInformation(const CXXRecordDecl *RD);
 
-  /// ErrorUnsupported - Print out an error that the v-table layout code
-  /// doesn't support the particular C++ feature yet.
-  void ErrorUnsupported(StringRef Feature, SourceLocation Location);
-
 public:
   VTableContext(ASTContext &Context);
   ~VTableContext();
index 44cb32db01a2a7e6a1a1821546b0934522a8f322..8374316ac6477231d306c4bd061e4add58e2b8ed 100644 (file)
@@ -6419,15 +6419,6 @@ ASTContext::ProtocolCompatibleWithProtocol(ObjCProtocolDecl *lProto,
   return false;
 }
 
-/// QualifiedIdConformsQualifiedId - compare id<pr,...> with id<pr1,...>
-/// return true if lhs's protocols conform to rhs's protocol; false
-/// otherwise.
-bool ASTContext::QualifiedIdConformsQualifiedId(QualType lhs, QualType rhs) {
-  if (lhs->isObjCQualifiedIdType() && rhs->isObjCQualifiedIdType())
-    return ObjCQualifiedIdTypesAreCompatible(lhs, rhs, false);
-  return false;
-}
-
 /// ObjCQualifiedClassTypesAreCompatible - compare  Class<pr,...> and
 /// Class<pr1, ...>.
 bool ASTContext::ObjCQualifiedClassTypesAreCompatible(QualType lhs, 
index 7e85880b5fc6a1324e6e3c1cc13b4c2470a9d117..d9d79f4cccdda84e788c99c87ccd26887986e2ac 100644 (file)
@@ -298,28 +298,6 @@ AttributedStmt *AttributedStmt::CreateEmpty(ASTContext &C, unsigned NumAttrs) {
   return new (Mem) AttributedStmt(EmptyShell(), NumAttrs);
 }
 
-bool Stmt::hasImplicitControlFlow() const {
-  switch (StmtBits.sClass) {
-    default:
-      return false;
-
-    case CallExprClass:
-    case ConditionalOperatorClass:
-    case ChooseExprClass:
-    case StmtExprClass:
-    case DeclStmtClass:
-      return true;
-
-    case Stmt::BinaryOperatorClass: {
-      const BinaryOperator* B = cast<BinaryOperator>(this);
-      if (B->isLogicalOp() || B->getOpcode() == BO_Comma)
-        return true;
-      else
-        return false;
-    }
-  }
-}
-
 std::string AsmStmt::generateAsmString(ASTContext &C) const {
   if (const GCCAsmStmt *gccAsmStmt = dyn_cast<GCCAsmStmt>(this))
     return gccAsmStmt->generateAsmString(C);
index c32df11b66777c72ae461b847087e72bc08ae348..af4ea096721a45c1f58e9f5ce5403f41ab971eb3 100644 (file)
@@ -357,23 +357,6 @@ const Type *Type::getUnqualifiedDesugaredType() const {
     }
   }
 }
-
-bool Type::isDerivedType() const {
-  switch (CanonicalType->getTypeClass()) {
-  case Pointer:
-  case VariableArray:
-  case ConstantArray:
-  case IncompleteArray:
-  case FunctionProto:
-  case FunctionNoProto:
-  case LValueReference:
-  case RValueReference:
-  case Record:
-    return true;
-  default:
-    return false;
-  }
-}
 bool Type::isClassType() const {
   if (const RecordType *RT = getAs<RecordType>())
     return RT->getDecl()->isClass();
@@ -1917,7 +1900,8 @@ anyDependentTemplateArguments(const TemplateArgumentLoc *Args, unsigned N,
   return false;
 }
 
-bool TemplateSpecializationType::
+#ifndef NDEBUG
+static bool 
 anyDependentTemplateArguments(const TemplateArgument *Args, unsigned N,
                               bool &InstantiationDependent) {
   for (unsigned i = 0; i != N; ++i) {
@@ -1931,6 +1915,7 @@ anyDependentTemplateArguments(const TemplateArgument *Args, unsigned N,
   }
   return false;
 }
+#endif
 
 TemplateSpecializationType::
 TemplateSpecializationType(TemplateName T,
@@ -1954,8 +1939,8 @@ TemplateSpecializationType(TemplateName T,
   (void)InstantiationDependent;
   assert((!Canon.isNull() ||
           T.isDependent() || 
-          anyDependentTemplateArguments(Args, NumArgs, 
-                                        InstantiationDependent)) &&
+          ::anyDependentTemplateArguments(Args, NumArgs, 
+                                          InstantiationDependent)) &&
          "No canonical type for non-dependent class template specialization");
 
   TemplateArgument *TemplateArgs
index 65e11b7af8fba757f382bed9f211a56ca6c7e5a0..74669d565dafd39e9dd9480496584fdb66bc69bf 100644 (file)
@@ -2272,8 +2272,7 @@ VTableLayout::VTableLayout(uint64_t NumVTableComponents,
 VTableLayout::~VTableLayout() { }
 
 VTableContext::VTableContext(ASTContext &Context)
-  : Context(Context),
-    IsMicrosoftABI(Context.getTargetInfo().getCXXABI().isMicrosoft()) {
+  : IsMicrosoftABI(Context.getTargetInfo().getCXXABI().isMicrosoft()) {
 }
 
 VTableContext::~VTableContext() {
@@ -2378,14 +2377,6 @@ void VTableContext::ComputeVTableRelatedInformation(const CXXRecordDecl *RD) {
   }
 }
 
-void VTableContext::ErrorUnsupported(StringRef Feature,
-                                     SourceLocation Location) {
-  clang::DiagnosticsEngine &Diags = Context.getDiagnostics();
-  unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
-                                  "v-table layout for %0 is not supported yet");
-  Diags.Report(Context.getFullLoc(Location), DiagID) << Feature;
-}
-
 VTableLayout *VTableContext::createConstructionVTableLayout(
                                           const CXXRecordDecl *MostDerivedClass,
                                           CharUnits MostDerivedClassOffset,