[llvm] r212679 - Explicitly define move constructor and move assignment operator to appease MSVC.

Peter Collingbourne peter at pcc.me.uk
Wed Jul 9 21:29:06 PDT 2014


Author: pcc
Date: Wed Jul  9 23:29:06 2014
New Revision: 212679

URL: http://llvm.org/viewvc/llvm-project?rev=212679&view=rev
Log:
Explicitly define move constructor and move assignment operator to appease MSVC.

Modified:
    llvm/trunk/lib/Support/SpecialCaseList.cpp

Modified: llvm/trunk/lib/Support/SpecialCaseList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SpecialCaseList.cpp?rev=212679&r1=212678&r2=212679&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SpecialCaseList.cpp (original)
+++ llvm/trunk/lib/Support/SpecialCaseList.cpp Wed Jul  9 23:29:06 2014
@@ -34,6 +34,15 @@ namespace llvm {
 /// reason for doing so is efficiency; StringSet is much faster at matching
 /// literal strings than Regex.
 struct SpecialCaseList::Entry {
+  Entry() {}
+  Entry(Entry &&Other)
+      : Strings(std::move(Other.Strings)), RegEx(std::move(Other.RegEx)) {}
+  Entry &operator=(Entry &&Other) {
+    Strings = std::move(Other.Strings);
+    RegEx = std::move(Other.RegEx);
+    return *this;
+  }
+
   StringSet<> Strings;
   std::unique_ptr<Regex> RegEx;
 





More information about the llvm-commits mailing list