summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/unittests/DriverTests/InputGraphTest.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/lld/unittests/DriverTests/InputGraphTest.cpp b/lld/unittests/DriverTests/InputGraphTest.cpp
index 18e3cf15f01..893f7afebde 100644
--- a/lld/unittests/DriverTests/InputGraphTest.cpp
+++ b/lld/unittests/DriverTests/InputGraphTest.cpp
@@ -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
OpenPOWER on IntegriCloud