slang: Improve handling of StringMapEntries.
In Slang::checkODR(), change a line that deletes an entry when it
fails to be inserted. There are two problems with this line:
(1) Calling delete is wrong, since the entry is malloc'ed.
(2) The line is unreachable.
Since the line is unreachable, replace it with an assert attesting to
In RSContext::insertExportType(), the code properly cleans up an entry
that failed to be inserted with free(). However, given that malloc()
is not called anywhere in slang, this could be confusing. Use the
Destroy() member function instead.
2 files changed