[cfe-commits] r103688 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/Type.h lib/AST/Expr.cpp lib/AST/Type.cpp
Chris Lattner
sabre at nondot.org
Wed May 12 18:02:19 PDT 2010
Author: lattner
Date: Wed May 12 20:02:19 2010
New Revision: 103688
URL: http://llvm.org/viewvc/llvm-project?rev=103688&view=rev
Log:
add a couple of key functions for classes without them.
Modified:
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/AST/Type.h
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/AST/Type.cpp
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=103688&r1=103687&r2=103688&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Wed May 12 20:02:19 2010
@@ -51,6 +51,7 @@
class Expr : public Stmt {
QualType TR;
+ virtual void ANCHOR(); // key function.
protected:
/// TypeDependent - Whether this expression is type-dependent
/// (C++ [temp.dep.expr]).
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=103688&r1=103687&r2=103688&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Wed May 12 20:02:19 2010
@@ -1733,6 +1733,8 @@
/// 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;
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=103688&r1=103687&r2=103688&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Wed May 12 20:02:19 2010
@@ -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
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=103688&r1=103687&r2=103688&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Wed May 12 20:02:19 2010
@@ -906,10 +906,12 @@
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");
More information about the cfe-commits
mailing list