add_to_front method for code_with_references_listt
This will make it easier to add declarations at the begginning of a list of codet after the rest of the code has been generated.
This commit is contained in:
parent
93aa152425
commit
5cd0c45842
|
@ -68,3 +68,9 @@ void code_with_references_listt::append(code_with_references_listt &&other)
|
|||
{
|
||||
list.splice(list.end(), other.list);
|
||||
}
|
||||
|
||||
void code_with_references_listt::add_to_front(code_without_referencest code)
|
||||
{
|
||||
auto ptr = std::make_shared<code_without_referencest>(std::move(code));
|
||||
list.emplace_front(std::move(ptr));
|
||||
}
|
||||
|
|
|
@ -101,6 +101,8 @@ public:
|
|||
void add(reference_allocationt ref);
|
||||
|
||||
void append(code_with_references_listt &&other);
|
||||
|
||||
void add_to_front(code_without_referencest code);
|
||||
};
|
||||
|
||||
#endif // CPROVER_JAVA_BYTECODE_CODE_WITH_REFERENCES_H
|
||||
|
|
Loading…
Reference in New Issue