[lld] r205469 - Remove unused fields/member functions from unit test.

Rui Ueyama ruiu at google.com
Wed Apr 2 14:49:28 PDT 2014


Author: ruiu
Date: Wed Apr  2 16:49:27 2014
New Revision: 205469

URL: http://llvm.org/viewvc/llvm-project?rev=205469&view=rev
Log:
Remove unused fields/member functions from unit test.

Modified:
    lld/trunk/unittests/DriverTests/InputGraphTest.cpp

Modified: lld/trunk/unittests/DriverTests/InputGraphTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/InputGraphTest.cpp?rev=205469&r1=205468&r2=205469&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/InputGraphTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/InputGraphTest.cpp Wed Apr  2 16:49:27 2014
@@ -62,23 +62,14 @@ private:
 class InputGraphTest : public testing::Test {
 public:
   InputGraphTest() {
-    _inputGraph.reset(new InputGraph());
-    _context.setInputGraph(std::move(_inputGraph));
+    _ctx.setInputGraph(std::unique_ptr<InputGraph>(new InputGraph()));
   }
 
-  virtual LinkingContext &linkingContext() { return _context; }
-
-  InputElement &inputElement(unsigned index) {
-    return linkingContext().inputGraph()[index];
-  }
-
-  virtual InputGraph &inputGraph() { return linkingContext().inputGraph(); }
-
-  int inputFileCount() { return linkingContext().inputGraph().size(); }
+  InputGraph &inputGraph() { return _ctx.inputGraph(); }
+  int inputFileCount() { return _ctx.inputGraph().size(); }
 
 protected:
-  MyLinkingContext _context;
-  std::unique_ptr<InputGraph> _inputGraph;
+  MyLinkingContext _ctx;
 };
 
 } // end anonymous namespace





More information about the llvm-commits mailing list