MaskRay added a comment.

Can `createMCObjectFileInfo` return `MCObjectFileInfo` instead of 
`std::unique_ptr<MCObjectFileInfo>`?



================
Comment at: clang/lib/Parse/ParseStmtAsm.cpp:590
+
   if (!MAI || !MII || !MOFI || !STI) {
     Diag(AsmLoc, diag::err_msasm_unable_to_create_target)
----------------
Can `MOFI` be null? (i.e. can createMCObjectFileInfo guarantee no-null return 
value?)

Consider moving the construction below the checks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101921

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

Reply via email to