1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

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

llvm-svn: 292597
This commit is contained in:
Mehdi Amini 2017-01-20 10:18:32 +00:00
parent 1310b4c7b3
commit bb7d25247a

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);