[cfe-commits] r72656 - in /cfe/trunk/lib/CodeGen: CGCXX.cpp CGExprScalar.cpp CodeGenFunction.h
Anders Carlsson
andersca at mac.com
Sat May 30 18:40:14 PDT 2009
Author: andersca
Date: Sat May 30 20:40:14 2009
New Revision: 72656
URL: http://llvm.org/viewvc/llvm-project?rev=72656&view=rev
Log:
Add a new function for emitting new functions.
Modified:
cfe/trunk/lib/CodeGen/CGCXX.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=72656&r1=72655&r2=72656&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sat May 30 20:40:14 2009
@@ -226,6 +226,11 @@
return RV;
}
+llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) {
+ ErrorUnsupported(E, "new expression");
+ return llvm::UndefValue::get(ConvertType(E->getType()));
+}
+
static bool canGenerateCXXstructor(const CXXRecordDecl *RD,
ASTContext &Context) {
// The class has base classes - we don't support that right now.
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=72656&r1=72655&r2=72656&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sat May 30 20:40:14 2009
@@ -285,6 +285,9 @@
Value *VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E) {
return CGF.EmitCXXExprWithTemporaries(E).getScalarVal();
}
+ Value *VisitCXXNewExpr(const CXXNewExpr *E) {
+ return CGF.EmitCXXNewExpr(E);
+ }
// Binary Operators.
Value *EmitMul(const BinOpInfo &Ops) {
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=72656&r1=72655&r2=72656&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Sat May 30 20:40:14 2009
@@ -484,6 +484,8 @@
void PushCXXTemporary(const CXXTemporary *Temporary, llvm::Value *Ptr);
+ llvm::Value *EmitCXXNewExpr(const CXXNewExpr *E);
+
//===--------------------------------------------------------------------===//
// Declaration Emission
//===--------------------------------------------------------------------===//
More information about the cfe-commits
mailing list