Skip to content

Commit 7ecd2a2

Browse files
committed
[SelectionDAG] Fix missing lambda capture
Move MaxDepth into the lambda, since it is not needed outside. This fixes some compilers that complain about missing capture: error C3493: 'MaxDepth' cannot be implicitly captured because no default capture mode has been specified Fixes: f693932 ("[SelectionDAG] Transitively copy NodeExtraInfo on RAUW")
1 parent 00e5553 commit 7ecd2a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12240,8 +12240,8 @@ void SelectionDAG::copyExtraInfo(SDNode *From, SDNode *To) {
1224012240
// from the old From node. This avoids copying NodeExtraInfo to parts of the
1224112241
// DAG that is not new and should be left untouched.
1224212242
DenseSet<const SDNode *> Visited;
12243-
constexpr int MaxDepth = 16;
1224412243
auto VisitFrom = [&Visited](auto &&Self, SDNode *N, int Depth) {
12244+
constexpr int MaxDepth = 16;
1224512245
if (Depth >= MaxDepth)
1224612246
return;
1224712247
if (!Visited.insert(N).second)

0 commit comments

Comments
 (0)