d.zobnin.bugzilla added a comment.

Thank you for the review!

David, I started from the assertion failure and was going up the call stack 
trying to understand what should be changed to make the assertion go away. In 
shouldReturnTypeInRegister() function there is isRegisterSize(Size) check for 
i386, which returns false for 0-sized types, so I naively assumed that for MCU 
we missed the 0-case check. I must have read the ABI more carefully...

While searching for a correct solution for this, I saw that 'void' return type 
is handled in classifyReturnType() by returning ABIArgInfo::getIgnore(). 
According to the comments:

  /// Ignore - Ignore the argument (treat as void). Useful for void and
  /// empty structs.
  Ignore,

Does it mean that we can treat empty structs and unions in return type as void 
in this case?


http://reviews.llvm.org/D16808



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

Reply via email to