[llvm] r231204 - Workaround MSVC not providing implicit move members

David Blaikie dblaikie at gmail.com
Tue Mar 3 18:07:51 PST 2015


Author: dblaikie
Date: Tue Mar  3 20:07:51 2015
New Revision: 231204

URL: http://llvm.org/viewvc/llvm-project?rev=231204&view=rev
Log:
Workaround MSVC not providing implicit move members

Modified:
    llvm/trunk/lib/AsmParser/LLParser.h

Modified: llvm/trunk/lib/AsmParser/LLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=231204&r1=231203&r2=231204&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.h (original)
+++ llvm/trunk/lib/AsmParser/LLParser.h Tue Mar  3 20:07:51 2015
@@ -65,6 +65,14 @@ namespace llvm {
     std::unique_ptr<Constant*[]> ConstantStructElts;
 
     ValID() : Kind(t_LocalID), APFloatVal(0.0) {}
+    // Workaround for MSVC not synthesizing implicit move members.
+    ValID(ValID &&RHS)
+        : Kind(std::move(RHS.Kind)), Loc(std::move(RHS.Loc)),
+          UIntVal(std::move(RHS.UIntVal)), StrVal(std::move(RHS.StrVal)),
+          StrVal2(std::move(RHS.StrVal2)), APSIntVal(std::move(RHS.APSIntVal)),
+          APFloatVal(std::move(RHS.APFloatVal)),
+          ConstantVal(std::move(RHS.ConstantVal)),
+          ConstantStructElts(std::move(RHS.ConstantStructElts)) {}
 
     bool operator<(const ValID &RHS) const {
       if (Kind == t_LocalID || Kind == t_GlobalID)





More information about the llvm-commits mailing list