Fix potential crash in Flang generateLLVMIR() when MLIR fails to translate to LLVM
authorMehdi Amini <joker.eph@gmail.com>
Sun, 19 Feb 2023 06:14:20 +0000 (22:14 -0800)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 19 Feb 2023 16:55:46 +0000 (08:55 -0800)
commit723cd2e953d245ca9d6df6c4f3852d3ebbe0b253
treeb09602581823540b348808f22500b5095db7df4b
parentcf83e79a4bc8d641d50d9412f71f6e6c67338737
Fix potential crash in Flang generateLLVMIR() when MLIR fails to translate to LLVM

This is pure code motion, to ensure that the check if we have a valid llvmModule
comes before trying to set option on this module.

Differential Revision: https://reviews.llvm.org/D144342
flang/lib/Frontend/FrontendActions.cpp