Implement a Shallow Clone operation for types.

This is needed to track name changes for the documentation.

With this things, which do not need val-cloning, generally seem to work
again. There are a whole bunch of test failures at the moment.
This commit is contained in:
Johanna Amann 2019-05-17 11:13:04 -07:00
parent 474efe9e69
commit ffa173abc0
3 changed files with 92 additions and 12 deletions

View file

@ -273,7 +273,7 @@ void add_type(ID* id, BroType* t, attr_list* attr)
tnew = t;
else
// Clone the type to preserve type name aliasing.
tnew = t->Clone();
tnew = t->ShallowClone();
BroType::AddAlias(new_type_name, tnew);