[PATCH] D34834: [objc] Don't require null-check and don't emit memset when result is ignored for struct-returning method calls

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 13:58:59 PDT 2017


rjmccall added a comment.

Please include an IRGen test directly for the lifetime marker emission you want, and please make sure you test the ns_consumed argument + ignored stret result case.



================
Comment at: tools/clang/lib/CodeGen/CGObjCMac.cpp:2147
+  if (Return.isUnused())
+    RequiresNullCheck = false;
+
----------------
Please add a comment here, something like "We don't need to emit a null check to zero out an indirect result if the result is ignored."


Repository:
  rL LLVM

https://reviews.llvm.org/D34834





More information about the llvm-commits mailing list