File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -509,11 +509,10 @@ struct IRInstructionMapper {
509509 : InstDataAllocator(IDA), IDLAllocator(IDLA) {
510510 // Make sure that the implementation of DenseMapInfo<unsigned> hasn't
511511 // changed.
512- assert (DenseMapInfo<unsigned >::getEmptyKey () == static_cast <unsigned >(-1 ) &&
513- " DenseMapInfo<unsigned>'s empty key isn't -1!" );
514- assert (DenseMapInfo<unsigned >::getTombstoneKey () ==
515- static_cast <unsigned >(-2 ) &&
516- " DenseMapInfo<unsigned>'s tombstone key isn't -2!" );
512+ static_assert (DenseMapInfo<unsigned >::getEmptyKey () ==
513+ static_cast <unsigned >(-1 ));
514+ static_assert (DenseMapInfo<unsigned >::getTombstoneKey () ==
515+ static_cast <unsigned >(-2 ));
517516
518517 IDL = new (IDLAllocator->Allocate ())
519518 IRInstructionDataList ();
Original file line number Diff line number Diff line change @@ -204,10 +204,10 @@ class IROutliner {
204204 : getTTI(GTTI), getIRSI(GIRSI), getORE(GORE) {
205205
206206 // Check that the DenseMap implementation has not changed.
207- assert (DenseMapInfo<unsigned >::getEmptyKey () == ( unsigned )- 1 &&
208- " DenseMapInfo<unsigned>'s empty key isn't -1! " );
209- assert (DenseMapInfo<unsigned >::getTombstoneKey () == ( unsigned )- 2 &&
210- " DenseMapInfo<unsigned>'s tombstone key isn't -2! " );
207+ static_assert (DenseMapInfo<unsigned >::getEmptyKey () ==
208+ static_cast < unsigned >(- 1 ) );
209+ static_assert (DenseMapInfo<unsigned >::getTombstoneKey () ==
210+ static_cast < unsigned >(- 2 ) );
211211 }
212212 bool run (Module &M);
213213
Original file line number Diff line number Diff line change @@ -420,10 +420,10 @@ struct InstructionMapper {
420420 InstructionMapper (const MachineModuleInfo &MMI_) : MMI(MMI_) {
421421 // Make sure that the implementation of DenseMapInfo<unsigned> hasn't
422422 // changed.
423- assert (DenseMapInfo<unsigned >::getEmptyKey () == ( unsigned )- 1 &&
424- " DenseMapInfo<unsigned>'s empty key isn't -1! " );
425- assert (DenseMapInfo<unsigned >::getTombstoneKey () == ( unsigned )- 2 &&
426- " DenseMapInfo<unsigned>'s tombstone key isn't -2! " );
423+ static_assert (DenseMapInfo<unsigned >::getEmptyKey () ==
424+ static_cast < unsigned >(- 1 ) );
425+ static_assert (DenseMapInfo<unsigned >::getTombstoneKey () ==
426+ static_cast < unsigned >(- 2 ) );
427427 }
428428};
429429
You can’t perform that action at this time.
0 commit comments