Abstract more member-pointerness out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111771 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCXXABI.h b/lib/CodeGen/CGCXXABI.h
index a28436b..36f8230 100644
--- a/lib/CodeGen/CGCXXABI.h
+++ b/lib/CodeGen/CGCXXABI.h
@@ -16,12 +16,15 @@
#define CLANG_CODEGEN_CXXABI_H
namespace llvm {
+ class Constant;
class Value;
}
namespace clang {
class CastExpr;
+ class CXXRecordDecl;
class MemberPointerType;
+ class QualType;
namespace CodeGen {
class CodeGenFunction;
@@ -42,11 +45,31 @@
llvm::Value *MemPtr,
const MemberPointerType *MPT);
- virtual void EmitMemberPointerConversion(CodeGenFunction &CGF,
- const CastExpr *E,
- llvm::Value *Src,
- llvm::Value *Dest,
- bool VolatileDest);
+ virtual void
+ EmitMemberFunctionPointerConversion(CodeGenFunction &CGF,
+ const CastExpr *E,
+ llvm::Value *Src,
+ llvm::Value *Dest,
+ bool VolatileDest);
+
+ virtual void EmitNullMemberFunctionPointer(CodeGenFunction &CGF,
+ const MemberPointerType *MPT,
+ llvm::Value *Dest,
+ bool VolatileDest);
+
+ // Manipulations on constant expressions.
+
+ /// \brief Returns true if zero-initializing the given type requires
+ /// a constant other than the LLVM null value.
+ virtual bool RequiresNonZeroInitializer(QualType T);
+ virtual bool RequiresNonZeroInitializer(const CXXRecordDecl *D);
+
+ virtual llvm::Constant *
+ EmitMemberFunctionPointerConversion(llvm::Constant *C,
+ const CastExpr *E);
+
+ virtual llvm::Constant *
+ EmitNullMemberFunctionPointer(const MemberPointerType *MPT);
};
/// Creates an instance of a C++ ABI class.