1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

Relax assertions when there's really no entries. [NFC]

This commit is contained in:
Michael Liao 2019-10-22 12:11:25 -04:00
parent 4478256d9e
commit fdd7033910

View File

@ -83,7 +83,7 @@ public:
bool empty() const { return Seqs.empty(); }
unsigned size() const {
assert(Entries && "Call layout() before size()");
assert((empty() || Entries) && "Call layout() before size()");
return Entries;
}
@ -113,7 +113,7 @@ public:
void emit(raw_ostream &OS,
void (*Print)(raw_ostream&, ElemT),
const char *Term = "0") const {
assert(Entries && "Call layout() before emit()");
assert((empty() || Entries) && "Call layout() before emit()");
for (typename SeqMap::const_iterator I = Seqs.begin(), E = Seqs.end();
I != E; ++I) {
OS << " /* " << I->second << " */ ";