rjmccall added inline comments.

================
Comment at: llvm/include/llvm/IR/IRBuilder.h:262
     Function *F = BB->getParent();
-    if (!F->hasFnAttribute(Attribute::StrictFP)) {
+    if (F && !F->hasFnAttribute(Attribute::StrictFP)) {
       F->addFnAttr(Attribute::StrictFP);
----------------
kpn wrote:
> This looks reasonable to me. 
> 
> It smells like there's a larger strictfp IRBuilder issue, but that's not an 
> issue for this patch here. The larger issue won't be hit since the new 
> options affect the entire compilation. It therefore shouldn't block this 
> patch.
Does IRBuilder actually support inserting into an unparented basic block?  I 
feel like this is exposing a much more serious mis-use of IRBuilder.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62731/new/

https://reviews.llvm.org/D62731



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

Reply via email to