aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGCXX.cpp5
-rw-r--r--lib/CodeGen/CGExprScalar.cpp3
-rw-r--r--lib/CodeGen/CodeGenFunction.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 3186ccde66..805805c663 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -226,6 +226,11 @@ CodeGenFunction::EmitCXXExprWithTemporaries(const CXXExprWithTemporaries *E,
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.
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index e4d3ff5a2e..950e9e5509 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -285,6 +285,9 @@ public:
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) {
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 2a2d11ea2e..b7894a4068 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -484,6 +484,8 @@ public:
void PushCXXTemporary(const CXXTemporary *Temporary, llvm::Value *Ptr);
+ llvm::Value *EmitCXXNewExpr(const CXXNewExpr *E);
+
//===--------------------------------------------------------------------===//
// Declaration Emission
//===--------------------------------------------------------------------===//