vsk added inline comments.
================ Comment at: lib/CodeGen/CGStmt.cpp:1035 + assert(ReturnLocation.isValid() && "No valid return location"); + Builder.CreateStore(Builder.CreateBitCast(SLocPtr, Int8PtrTy), + ReturnLocation); ---------------- filcab wrote: > Can't you just keep the `Constant*` around and use it later for the static > data? Instead of creating a global var and have runtime store/load? I hope I've cleared this up, but: we need to store the source location constant _somewhere_, before we emit the return value check. That's because we can't infer which return location to use at compile time. ================ Comment at: lib/CodeGen/CodeGenFunction.h:1412 + /// source location for diagnostics. + Address ReturnLocation = Address::invalid(); + ---------------- filcab wrote: > Maybe `CurrentReturnLocation`? I'd prefer to keep it the way it is, for consistency with the "ReturnValue" field. https://reviews.llvm.org/D34299 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits