00001
00002
00003
00004
00005
00006
00007
00008 #ifndef STATICASSERT_H_
00009 #define STATICASSERT_H_
00010 #include "Instruction.h"
00011
00012 #define STATIC_ASSERT_ID "static_assert"
00013
00014 namespace sail {
00015
00021 class StaticAssert: public Instruction {
00022 friend class boost::serialization::access;
00023
00024 template<class Archive>
00025 void serialize(Archive & ar, const unsigned int version)
00026 {
00027 ar & boost::serialization::base_object<sail::Instruction>(*this);
00028 ar & assert_predicate;
00029 }
00030 private:
00031 Symbol* assert_predicate;
00032 public:
00033 StaticAssert();
00034 StaticAssert(Symbol* arg, il::node* original, int line);
00035 virtual ~StaticAssert();
00036
00037 virtual string to_string() const;
00038 virtual string to_string(bool pretty_print) const;
00039 il::node* get_original_node();
00040
00041 virtual bool is_save_instruction();
00042
00043
00044
00045
00046
00047
00048
00049 bool is_synthetic();
00050 Symbol* get_predicate();
00051
00052 virtual bool is_removable();
00053 };
00054 }
00055 #endif