rjmccall added inline comments.

================
Comment at: lib/CodeGen/CGExprAgg.cpp:964
+    RHS = CGF.EmitAnyExpr(E->getRHS()).getAggregatePointer();
+    break;
+  case TEK_Complex:
----------------
EricWF wrote:
> EricWF wrote:
> > rjmccall wrote:
> > > It looks like we don't actually support any aggregate types here, which I 
> > > think is fine because comparing those types is only sensible for things 
> > > like calls.  If you do want to pave the way for that, or (probably more 
> > > usefully) for supporting complex types, you should make EmitCompare take 
> > > the operands as RValues and just use EmitAnyExpr here without paying any 
> > > attention to the evaluation kind.
> > Initially I thought the same thing, but apparently member pointers are 
> > Aggregates under the Microsoft ABI.
> > 
> > I'll give  trafficking in `RValue`s, but all the functions `EmitCompare` 
> > calls use `Value*`, so it'll take some work.
> *I'll give trafficking in `RValue`s a shot, but ...*
Okay, this would be a *lot* cleaner with RValue.  You can break it down in your 
EmitCmp helper function instead of EmitCompare if you want, but you've 
basically just inlined EmitAnyExpr here.


================
Comment at: lib/CodeGen/CGExprAgg.cpp:924
+  }();
+  ArgTy->isAnyComplexType();
+  if (ArgTy->hasFloatingRepresentation())
----------------
Dead code?


https://reviews.llvm.org/D45476



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to