mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
[BOLT] Fix Windows build
Summary: Make BOLT build in VisualStudio compiler and run without crashing on a simple test. Other tests are not running. (cherry picked from FBD32378736)
This commit is contained in:
committed by
Maksim Panchenko
parent
0e7dd1aad1
commit
ae585be11c
@@ -81,8 +81,9 @@ bool BinaryBasicBlock::validateSuccessorInvariants() {
|
||||
// any overlapping jump tables. We only look at the entries for the jump
|
||||
// table that is referenced at the last instruction.
|
||||
const auto Range = JT->getEntriesForAddress(BC.MIB->getJumpTable(*Inst));
|
||||
const std::vector<const MCSymbol *> Entries(&JT->Entries[Range.first],
|
||||
&JT->Entries[Range.second]);
|
||||
const std::vector<const MCSymbol *> Entries(
|
||||
std::next(JT->Entries.begin(), Range.first),
|
||||
std::next(JT->Entries.begin(), Range.second));
|
||||
std::set<const MCSymbol *> UniqueSyms(Entries.begin(), Entries.end());
|
||||
for (BinaryBasicBlock *Succ : Successors) {
|
||||
auto Itr = UniqueSyms.find(Succ->getLabel());
|
||||
|
||||
Reference in New Issue
Block a user