Commit 84012551 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

Fix gcc compile error

Bug: v8:8126

R=sattlerf@google.com
CC=jgruber@chromium.org, titzer@chromium.org

Change-Id: I32ec94fd913def346d1e783b2ffd0ec7d16e5df5
Reviewed-on: https://chromium-review.googlesource.com/1203730Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55600}
parent 8cc3da3c
......@@ -32,8 +32,8 @@ class Label {
// In debug builds, the old Label has to be cleared in order to avoid a DCHECK
// failure in it's destructor.
#ifdef DEBUG
Label(Label&& other) { *this = std::move(other); }
Label& operator=(Label&& other) {
Label(Label&& other) V8_NOEXCEPT { *this = std::move(other); }
Label& operator=(Label&& other) V8_NOEXCEPT {
pos_ = other.pos_;
near_link_pos_ = other.near_link_pos_;
other.Unuse();
......@@ -41,8 +41,8 @@ class Label {
return *this;
}
#else
Label(Label&&) = default;
Label& operator=(Label&&) = default;
Label(Label&&) V8_NOEXCEPT = default;
Label& operator=(Label&&) V8_NOEXCEPT = default;
#endif
#endif
......
......@@ -63,9 +63,11 @@ constexpr LoadType::LoadTypeValue kPointerLoadType =
// thus store the label on the heap and keep a unique_ptr.
class MovableLabel {
public:
Label* get() { return label_.get(); }
MOVE_ONLY_NO_DEFAULT_CONSTRUCTOR(MovableLabel);
MovableLabel() : label_(new Label()) {}
Label* get() { return label_.get(); }
private:
std::unique_ptr<Label> label_;
};
......@@ -73,6 +75,8 @@ class MovableLabel {
// On all other platforms, just store the Label directly.
class MovableLabel {
public:
MOVE_ONLY_WITH_DEFAULT_CONSTRUCTORS(MovableLabel);
Label* get() { return &label_; }
private:
......
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