agutowski marked 2 inline comments as done. agutowski added inline comments.
================ Comment at: lib/CodeGen/CGBuiltin.cpp:7610 + Value *SizeVal = EmitScalarExpr(E->getArg(2)); + EmitNonNullArgCheck(RValue::get(Dest.getPointer()), E->getArg(0)->getType(), + E->getArg(0)->getExprLoc(), FD, 0); ---------------- hans wrote: > Hmm, does the __stosb intrinsic require Dest to be non-null (e.g. would > Dest=NULL, Count=0 be OK?) I'm not even sure what llvm's memset requires > actually. I can't find any guarantee that memset accepts Dest=NULL and Count=0. So I guess we can either add a branch here, checking if the pointer is NULL (and that Count=0?) or assume that memset won't do anything strange. I vote for the latter (the current code does it). https://reviews.llvm.org/D25334 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits