]> granicus.if.org Git - clang/commitdiff
add a couple of key functions for classes without them.
authorChris Lattner <sabre@nondot.org>
Thu, 13 May 2010 01:02:19 +0000 (01:02 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 13 May 2010 01:02:19 +0000 (01:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103688 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h
include/clang/AST/Type.h
lib/AST/Expr.cpp
lib/AST/Type.cpp

index f3470a4b1d55fafe958cc9b8b5547f3c3eeab749..aff6376aeef4a6f5876ee306542ab5172af7d10f 100644 (file)
@@ -51,6 +51,7 @@ typedef UsuallyTinyPtrVector<const CXXBaseSpecifier> CXXBaseSpecifierArray;
 class Expr : public Stmt {
   QualType TR;
 
+  virtual void ANCHOR(); // key function.
 protected:
   /// TypeDependent - Whether this expression is type-dependent
   /// (C++ [temp.dep.expr]).
index dbf64371ab7d59bb1e7a6b24766e46e6dcced8ec..49022a8a61e00b9f10b25d4e66808cc97c23a5b0 100644 (file)
@@ -1733,6 +1733,8 @@ public:
 /// class of FunctionNoProtoType and FunctionProtoType.
 ///
 class FunctionType : public Type {
+  virtual void ANCHOR(); // Key function for FunctionType.
+  
   /// SubClassData - This field is owned by the subclass, put here to pack
   /// tightly with the ivars in Type.
   bool SubClassData : 1;
index 4a616719ccc3db1773922f6412aef6541bbd22bb..39643eebcb87bdebf0da58affef09538dfa65f8d 100644 (file)
@@ -27,6 +27,8 @@
 #include <algorithm>
 using namespace clang;
 
+void Expr::ANCHOR() {} // key function for Expr class.
+
 /// isKnownToHaveBooleanValue - Return true if this is an integer expression
 /// that is known to return 0 or 1.  This happens for _Bool/bool expressions
 /// but also int expressions which are produced by things like comparisons in
index 843785e634ae4f74f4cdd517177996bb479cada6..a5c3a209c8e7df7746daaef3d81f608b5fb2c95e 100644 (file)
@@ -906,10 +906,12 @@ const char *BuiltinType::getName(const LangOptions &LO) const {
   case UndeducedAuto:     return "auto";
   case ObjCId:            return "id";
   case ObjCClass:         return "Class";
-  case ObjCSel:         return "SEL";
+  case ObjCSel:           return "SEL";
   }
 }
 
+void FunctionType::ANCHOR() {} // Key function for FunctionType.
+
 llvm::StringRef FunctionType::getNameForCallConv(CallingConv CC) {
   switch (CC) {
   case CC_Default: llvm_unreachable("no name for default cc");