Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,10 @@ struct IRInstructionMapper {
: InstDataAllocator(IDA), IDLAllocator(IDLA) {
// Make sure that the implementation of DenseMapInfo<unsigned> hasn't
// changed.
assert(DenseMapInfo<unsigned>::getEmptyKey() == static_cast<unsigned>(-1) &&
"DenseMapInfo<unsigned>'s empty key isn't -1!");
assert(DenseMapInfo<unsigned>::getTombstoneKey() ==
static_cast<unsigned>(-2) &&
"DenseMapInfo<unsigned>'s tombstone key isn't -2!");
static_assert(DenseMapInfo<unsigned>::getEmptyKey() ==
static_cast<unsigned>(-1));
static_assert(DenseMapInfo<unsigned>::getTombstoneKey() ==
static_cast<unsigned>(-2));

IDL = new (IDLAllocator->Allocate())
IRInstructionDataList();
Expand Down
8 changes: 4 additions & 4 deletions llvm/include/llvm/Transforms/IPO/IROutliner.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ class IROutliner {
: getTTI(GTTI), getIRSI(GIRSI), getORE(GORE) {

// Check that the DenseMap implementation has not changed.
assert(DenseMapInfo<unsigned>::getEmptyKey() == (unsigned)-1 &&
"DenseMapInfo<unsigned>'s empty key isn't -1!");
assert(DenseMapInfo<unsigned>::getTombstoneKey() == (unsigned)-2 &&
"DenseMapInfo<unsigned>'s tombstone key isn't -2!");
static_assert(DenseMapInfo<unsigned>::getEmptyKey() ==
static_cast<unsigned>(-1));
static_assert(DenseMapInfo<unsigned>::getTombstoneKey() ==
static_cast<unsigned>(-2));
}
bool run(Module &M);

Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/CodeGen/MachineOutliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ struct InstructionMapper {
InstructionMapper(const MachineModuleInfo &MMI_) : MMI(MMI_) {
// Make sure that the implementation of DenseMapInfo<unsigned> hasn't
// changed.
assert(DenseMapInfo<unsigned>::getEmptyKey() == (unsigned)-1 &&
"DenseMapInfo<unsigned>'s empty key isn't -1!");
assert(DenseMapInfo<unsigned>::getTombstoneKey() == (unsigned)-2 &&
"DenseMapInfo<unsigned>'s tombstone key isn't -2!");
static_assert(DenseMapInfo<unsigned>::getEmptyKey() ==
static_cast<unsigned>(-1));
static_assert(DenseMapInfo<unsigned>::getTombstoneKey() ==
static_cast<unsigned>(-2));
}
};

Expand Down