Skip to content

Commit 4dbcefe

Browse files
committed
Revert the llvm::append_range change in lib/Target/X86/X86WinEHState.cpp
This reverts a single file from ad1ba15. llvm::append_range in this context fails to compile with recent Clang and libc++: libcxx/include/__algorithm/copy_backward.h:221:68: error: invalid operands to binary expression ('llvm::SuccIterator<llvm::Instruction, llvm::BasicBlock>' and 'long') ... llvm-project/llvm/lib/Target/X86/X86WinEHState.cpp:724:11: note: in instantiation of function template specialization 'llvm::append_range<std::deque<llvm::BasicBlock *>, llvm::iterator_range<llvm::SuccIterator<llvm::Instruction, llvm::BasicBlock >>>' requested here 724 | llvm::append_range(Worklist, successors(BB)); | ^
1 parent 10dd404 commit 4dbcefe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/X86/X86WinEHState.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,8 @@ void WinEHStatePass::addStateStores(Function &F, WinEHFuncInfo &FuncInfo) {
721721
// enqueue it's successors to see if we can infer their states.
722722
InitialStates.insert({BB, PredState});
723723
FinalStates.insert({BB, PredState});
724-
llvm::append_range(Worklist, successors(BB));
724+
for (BasicBlock *SuccBB : successors(BB))
725+
Worklist.push_back(SuccBB);
725726
}
726727

727728
// Try to hoist stores from successors.

0 commit comments

Comments
 (0)