fix PR4026: Clang can't codegen __func__ without implicit cast

llvm-svn: 69747
This commit is contained in:
Chris Lattner 2009-04-21 23:00:09 +00:00
parent d79b5a85b0
commit 2f343dd5c8
2 changed files with 14 additions and 6 deletions

View File

@ -64,16 +64,19 @@ public:
void VisitMemberExpr(MemberExpr *ME) { EmitAggLoadOfLValue(ME); } void VisitMemberExpr(MemberExpr *ME) { EmitAggLoadOfLValue(ME); }
void VisitUnaryDeref(UnaryOperator *E) { EmitAggLoadOfLValue(E); } void VisitUnaryDeref(UnaryOperator *E) { EmitAggLoadOfLValue(E); }
void VisitStringLiteral(StringLiteral *E) { EmitAggLoadOfLValue(E); } void VisitStringLiteral(StringLiteral *E) { EmitAggLoadOfLValue(E); }
void VisitCompoundLiteralExpr(CompoundLiteralExpr *E) void VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
{ EmitAggLoadOfLValue(E); } EmitAggLoadOfLValue(E);
}
void VisitArraySubscriptExpr(ArraySubscriptExpr *E) { void VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
EmitAggLoadOfLValue(E); EmitAggLoadOfLValue(E);
} }
void VisitBlockDeclRefExpr(const BlockDeclRefExpr *E) {
EmitAggLoadOfLValue(E);
}
void VisitPredefinedExpr(const PredefinedExpr *E) {
EmitAggLoadOfLValue(E);
}
void VisitBlockDeclRefExpr(const BlockDeclRefExpr *E)
{ EmitAggLoadOfLValue(E); }
// Operators. // Operators.
// case Expr::UnaryOperatorClass: // case Expr::UnaryOperatorClass:
// case Expr::CastExprClass: // case Expr::CastExprClass:

View File

@ -94,3 +94,8 @@ struct s6 { int f0; };
int f6(int a0, struct s6 a1, struct s6 a2) { int f6(int a0, struct s6 a1, struct s6 a2) {
return (a0 ? a1 : a2).f0; return (a0 ? a1 : a2).f0;
} }
// PR4026
void f7() {
__func__;
}