Check a module for errors.
Declared in <llvm/IR/Verifier.h>
bool
verifyModule(
Module const& M,
raw_ostream* OS = nullptr,
bool* BrokenDebugInfo = nullptr);
If there are no errors, the function returns false. If an error is found, a message describing the error is written to OS (if non-null) and true is returned.
true if the module is broken. If BrokenDebugInfo is supplied, DebugInfo verification failures won't be considered as error and instead *BrokenDebugInfo will be set to true. Debug info errors can be "recovered" from by stripping the debug info.
| Name | Description |
|---|---|
| M | Module whose IR is verified. |
| OS | Optional stream that receives a description of any error found. |
| BrokenDebugInfo | Optional flag set to true when only debug info is broken and IR is otherwise valid. |