Commit a4677f3a authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

[torque] explicitly constructing the std::pair

older gcc compilers (tested on PPC gcc 6) may throw the following error if
a non-copyable element is added to std::map:

src/torque/instance-type-generator.cc:192:76:   required from here
/usr/include/c++/6/ext/new_allocator.h:120:4: error: use of deleted
function 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&)
[with _T1 = v8::internal::torque::{anonymous}::InstanceTypeTree* const; _T2 =
std::unique_ptr<v8::internal::torque::{anonymous}::InstanceTypeTree>]'

explicitly constructing the std::pair will fix the compilation error.

Bug: v8:9850

Change-Id: I1e69e804be8bb9c16d013a90b532d670a97ed055
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1857552
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64275}
parent 164d0d3a
......@@ -189,9 +189,11 @@ int SolveInstanceTypeConstraints(
}
lowest_child = std::move(child);
} else if (child->start > child->end) {
unconstrained_children_by_size.insert({child.get(), std::move(child)});
unconstrained_children_by_size.insert(
std::make_pair(child.get(), std::move(child)));
} else {
constrained_children_by_start.insert({child->start, std::move(child)});
constrained_children_by_start.insert(
std::make_pair(child->start, std::move(child)));
}
}
root->children.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment