[lld] r295817 - [ELF] - Addressed post commit review comments for D30187

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 01:13:05 PST 2017


Author: grimar
Date: Wed Feb 22 03:13:04 2017
New Revision: 295817

URL: http://llvm.org/viewvc/llvm-project?rev=295817&view=rev
Log:
[ELF] - Addressed post commit review comments for D30187

* Added comment.
* Pass std::string copy instead using move semantic.

Modified:
    lld/trunk/ELF/LinkerScript.h

Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=295817&r1=295816&r2=295817&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Wed Feb 22 03:13:04 2017
@@ -89,9 +89,8 @@ struct BaseCommand {
 
 // This represents ". = <expr>" or "<symbol> = <expr>".
 struct SymbolAssignment : BaseCommand {
-  SymbolAssignment(StringRef Name, Expr E, std::string &&Loc)
-      : BaseCommand(AssignmentKind), Name(Name), Expression(E),
-        Location(std::move(Loc)) {}
+  SymbolAssignment(StringRef Name, Expr E, std::string Loc)
+      : BaseCommand(AssignmentKind), Name(Name), Expression(E), Location(Loc) {}
 
   static bool classof(const BaseCommand *C);
 
@@ -106,6 +105,7 @@ struct SymbolAssignment : BaseCommand {
   bool Provide = false;
   bool Hidden = false;
 
+  // Holds file name and line number for error reporting.
   std::string Location;
 };
 




More information about the llvm-commits mailing list