retdec
no_global_var_def_validator.h
Go to the documentation of this file.
1 
8 #ifndef RETDEC_LLVMIR2HLL_VALIDATOR_VALIDATORS_NO_GLOBAL_VAR_DEF_VALIDATOR_H
9 #define RETDEC_LLVMIR2HLL_VALIDATOR_VALIDATORS_NO_GLOBAL_VAR_DEF_VALIDATOR_H
10 
11 #include <string>
12 
15 
16 namespace retdec {
17 namespace llvmir2hll {
18 
31 public:
32  virtual std::string getId() const override;
33 
34  static ShPtr<Validator> create();
35 
36 private:
38 
42  virtual void visit(ShPtr<VarDefStmt> stmt) override;
44 };
45 
46 } // namespace llvmir2hll
47 } // namespace retdec
48 
49 #endif
A validator which checks that no global variable is defined in a VarDefStmt.
Definition: no_global_var_def_validator.h:30
virtual std::string getId() const override
Definition: no_global_var_def_validator.cpp:32
NoGlobalVarDefValidator()
Constructs a new validator.
Definition: no_global_var_def_validator.cpp:23
static ShPtr< Validator > create()
Creates a new validator.
Definition: no_global_var_def_validator.cpp:28
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
virtual void visit(ShPtr< GlobalVarDef > varDef) override
Definition: ordered_all_visitor.cpp:95
A base class for all validators.
Definition: validator.h:35
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
Declarations, aliases, macros, etc. for the use of smart pointers.
A base class for all validators.