7 #ifndef RETDEC_LLVMIR2HLL_VALIDATOR_VALIDATOR_H
8 #define RETDEC_LLVMIR2HLL_VALIDATOR_VALIDATOR_H
37 virtual std::string
getId()
const = 0;
44 void traverseAllGlobalVariables();
45 void traverseAllFunctions();
51 moduleIsCorrect =
false;
52 if (printMessageOnError) {
65 virtual void runValidation();
A visitor that visits everything in an ordered way.
Definition: ordered_all_visitor.h:44
A base class for all validators.
Definition: validator.h:35
virtual std::string getId() const =0
ShPtr< Module > module
The validated module.
Definition: validator.h:59
bool printMessageOnError
Should we print a warning message when encountering an error?
Definition: validator.h:69
bool moduleIsCorrect
true if there has not been an error, false otherwise.
Definition: validator.h:72
void validationError(const std::string &warningMessage)
Function to be called when there is a validation error.
Definition: validator.h:50
ShPtr< Function > func
The currently traversed function.
Definition: validator.h:62
static Logger error()
Definition: log.cpp:69
static const Action Warning
Definition: log.h:98
ShPtr< Module > module
The current module.
Definition: hll_writer.cpp:100
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
A visitor that visits everything in an ordered way.
Declarations, aliases, macros, etc. for the use of smart pointers.