From 29e32d384f9415a631709c3da99fd130f024b387 Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Sun, 17 Feb 2019 22:54:23 +0000 Subject: [PATCH] [NFC] Better encapsulation of llvm::Optional Storage, part II Fix for better Windows support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354239 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/Optional.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index 53f028f5422..b4093215bcf 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -108,7 +108,7 @@ public: OptionalStorage &operator=(OptionalStorage &&other) { if (other.hasValue()) - emplace(std::move(other).getValue()); + emplace(std::move(other.getValue())); else reset(); return *this; @@ -173,8 +173,8 @@ public: } #if LLVM_HAS_RVALUE_REFERENCE_THIS - T &&getValue() && { return std::move(Storage).getValue(); } - T &&operator*() && { return std::move(Storage).getValue(); } + T &&getValue() && { return std::move(Storage.getValue()); } + T &&operator*() && { return std::move(Storage.getValue()); } template T getValueOr(U &&value) && { -- 2.50.1