[lld] r240169 - Fix no-asserts build failure due to unused variable, and cleanup some unique_ptr usage while I'm here

David Blaikie dblaikie at gmail.com
Fri Jun 19 12:55:25 PDT 2015


Author: dblaikie
Date: Fri Jun 19 14:55:25 2015
New Revision: 240169

URL: http://llvm.org/viewvc/llvm-project?rev=240169&view=rev
Log:
Fix no-asserts build failure due to unused variable, and cleanup some unique_ptr usage while I'm here

Modified:
    lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp

Modified: lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp?rev=240169&r1=240168&r2=240169&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp Fri Jun 19 14:55:25 2015
@@ -14,6 +14,7 @@
 #include "lld/Core/Simple.h"
 #include "lld/ReaderWriter/CoreLinkingContext.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/STLExtras.h"
 
 using namespace lld;
 
@@ -40,8 +41,9 @@ bool CoreLinkingContext::validateImpl(ra
 
 void CoreLinkingContext::addPasses(PassManager &pm) {
   for (StringRef name : _passNames) {
+    (void)name;
     assert(name == "order" && "bad pass name");
-    pm.add(std::unique_ptr<Pass>(new OrderPass()));
+    pm.add(llvm::make_unique<OrderPass>());
   }
 }
 





More information about the llvm-commits mailing list