forked from OSchip/llvm-project
[flang][nfc] Add an assert to guard against `nullptr` dereferencing
Differential Revision: https://reviews.llvm.org/D119133
This commit is contained in:
parent
a33e98543a
commit
8d248002a6
|
@ -64,7 +64,10 @@ public:
|
|||
//===--------------------------------------------------------------------===//
|
||||
|
||||
mlir::MLIRContext &getMLIRContext() { return context; }
|
||||
mlir::ModuleOp &getModule() { return *module.get(); }
|
||||
mlir::ModuleOp &getModule() {
|
||||
assert(module && "This bridge is missing an MLIR module");
|
||||
return *module.get();
|
||||
}
|
||||
const Fortran::common::IntrinsicTypeDefaultKinds &getDefaultKinds() const {
|
||||
return defaultKinds;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue