Add an assertion to PlaceholderQueue destructor, ensuring it has been flushed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mehdi Amini 2017-01-20 10:18:32 +00:00
parent 1b647e664a
commit 1d95ccd099

View File

@ -358,6 +358,9 @@ class PlaceholderQueue {
std::deque<DistinctMDOperandPlaceholder> PHs;
public:
~PlaceholderQueue() {
assert(empty() && "PlaceholderQueue hasn't been flushed before being destroyed");
}
bool empty() { return PHs.empty(); }
DistinctMDOperandPlaceholder &getPlaceholderOp(unsigned ID);
void flush(BitcodeReaderMetadataList &MetadataList);