[cfe-dev] aggmsg.diff [Re: Continuing Adventures with Objective-C]
Devang Patel
dpatel at apple.com
Fri May 16 10:03:37 PDT 2008
On May 13, 2008, at 9:22 AM, David Chisnall wrote:
> aggmsg.diff generates message sends that return aggregate types by
> calling runtime-specific methods. There are corresponding changes
> in the runtime-specific code to make this actually work.
> Index: lib/CodeGen/CGExprAgg.cpp
> ===================================================================
> --- lib/CodeGen/CGExprAgg.cpp (revision 51026)
> +++ lib/CodeGen/CGExprAgg.cpp (working copy)
> @@ -77,12 +77,15 @@
> // case Expr::UnaryOperatorClass:
> // case Expr::CastExprClass:
> void VisitImplicitCastExpr(ImplicitCastExpr *E);
> + void VisitCastExpr(const CastExpr *E);
> void VisitCallExpr(const CallExpr *E);
> void VisitStmtExpr(const StmtExpr *E);
> void VisitBinaryOperator(const BinaryOperator *BO);
> void VisitBinAssign(const BinaryOperator *E);
> void VisitOverloadExpr(const OverloadExpr *E);
>
> + void VisitObjCMessageExpr(ObjCMessageExpr *E);
> +
>
Avoid xtra white spaces
> void VisitConditionalOperator(const ConditionalOperator *CO);
> void VisitInitListExpr(InitListExpr *E);
> @@ -182,9 +185,13 @@
> assert(CGF.getContext().typesAreCompatible(
> STy.getUnqualifiedType(), Ty.getUnqualifiedType())
> && "Implicit cast types must be compatible");
> -
> Visit(E->getSubExpr());
> }
> +// This should only be used when constructing a cast to a union type
> +void AggExprEmitter::VisitCastExpr(const CastExpr *E) {
> + // Does this work on big-endian archs?
why not ?
Patch is ok.
-
Devang
More information about the cfe-dev
mailing list