[llvm] r287888 - [X86] Don't round trip a unique_ptr through a raw pointer for assignment.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 07:17:39 PST 2016


Author: d0k
Date: Thu Nov 24 09:17:39 2016
New Revision: 287888

URL: http://llvm.org/viewvc/llvm-project?rev=287888&view=rev
Log:
[X86] Don't round trip a unique_ptr through a raw pointer for assignment.

No functional change.

Modified:
    llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp

Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=287888&r1=287887&r2=287888&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Thu Nov 24 09:17:39 2016
@@ -1940,7 +1940,7 @@ bool X86AsmParser::ParseZ(std::unique_pt
     return Error(getLexer().getLoc(), "Expected } at this point");
   Parser.Lex(); // Eat '}'
   // Assign Z with the {z} mark opernad
-  Z.reset(X86Operand::CreateToken("{z}", StartLoc).release());
+  Z = X86Operand::CreateToken("{z}", StartLoc);
   return false;
 }
 




More information about the llvm-commits mailing list