forked from OSchip/llvm-project
CodeGenModule::EmitVTableBitSetEntries: Add check for identical bit set entries.
No two elements of this array should be the same, but the standard library may pass the same element as both arguments to this function. llvm-svn: 230293
This commit is contained in:
parent
a586ea13a4
commit
4794190d81
|
@ -876,6 +876,9 @@ void CodeGenModule::EmitVTableBitSetEntries(llvm::GlobalVariable *VTable,
|
|||
// Sort the bit set entries for determinism.
|
||||
std::sort(BitsetEntries.begin(), BitsetEntries.end(), [](llvm::MDTuple *T1,
|
||||
llvm::MDTuple *T2) {
|
||||
if (T1 == T2)
|
||||
return false;
|
||||
|
||||
StringRef S1 = cast<llvm::MDString>(T1->getOperand(0))->getString();
|
||||
StringRef S2 = cast<llvm::MDString>(T2->getOperand(0))->getString();
|
||||
if (S1 < S2)
|
||||
|
|
Loading…
Reference in New Issue