summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp9
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index f8dc9dcd43a..cafe5761cac 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -121,6 +121,9 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) {
case Expr::StringLiteralClass:
return EmitStringLiteralLValue(cast<StringLiteral>(E));
+ case Expr::CXXConditionDeclExprClass:
+ return EmitCXXConditionDeclLValue(cast<CXXConditionDeclExpr>(E));
+
case Expr::ObjCMessageExprClass:
return EmitObjCMessageExprLValue(cast<ObjCMessageExpr>(E));
case Expr::ObjCIvarRefExprClass:
@@ -786,6 +789,12 @@ LValue CodeGenFunction::EmitCallExprLValue(const CallExpr *E) {
E->getType().getCVRQualifiers());
}
+LValue
+CodeGenFunction::EmitCXXConditionDeclLValue(const CXXConditionDeclExpr *E) {
+ EmitLocalBlockVarDecl(*E->getVarDecl());
+ return EmitDeclRefLValue(E);
+}
+
LValue CodeGenFunction::EmitObjCMessageExprLValue(const ObjCMessageExpr *E) {
// Can only get l-value for message expression returning aggregate type
RValue RV = EmitObjCMessageExpr(E);
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 5054b56d212..263a0f2f531 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -19,6 +19,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/IRBuilder.h"
#include "clang/AST/Expr.h"
+#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include <vector>
@@ -333,6 +334,8 @@ public:
LValue EmitLValueForField(llvm::Value* Base, FieldDecl* Field,
bool isUnion, unsigned CVRQualifiers);
+ LValue EmitCXXConditionDeclLValue(const CXXConditionDeclExpr *E);
+
LValue EmitObjCMessageExprLValue(const ObjCMessageExpr *E);
LValue EmitObjCIvarRefLValue(const ObjCIvarRefExpr *E);
LValue EmitObjCPropertyRefLValue(const ObjCPropertyRefExpr *E);
OpenPOWER on IntegriCloud