[lld] r208020 - Remove operator[] that was used only in tests.

Rui Ueyama ruiu at google.com
Mon May 5 17:50:47 PDT 2014


Author: ruiu
Date: Mon May  5 19:50:46 2014
New Revision: 208020

URL: http://llvm.org/viewvc/llvm-project?rev=208020&view=rev
Log:
Remove operator[] that was used only in tests.

Modified:
    lld/trunk/include/lld/Core/InputGraph.h
    lld/trunk/unittests/DriverTests/DriverTest.h

Modified: lld/trunk/include/lld/Core/InputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/InputGraph.h?rev=208020&r1=208019&r2=208020&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/InputGraph.h (original)
+++ lld/trunk/include/lld/Core/InputGraph.h Mon May  5 19:50:46 2014
@@ -84,10 +84,6 @@ public:
   /// \brief Dump the input Graph
   bool dump(raw_ostream &diagnostics = llvm::errs());
 
-  InputElement &operator[](size_t index) const {
-    return *_inputArgs[index];
-  }
-
   /// \brief Insert an element into the input graph at position.
   void insertElementAt(std::unique_ptr<InputElement>, Position position);
 

Modified: lld/trunk/unittests/DriverTests/DriverTest.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/DriverTest.h?rev=208020&r1=208019&r2=208020&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/DriverTest.h (original)
+++ lld/trunk/unittests/DriverTests/DriverTest.h Mon May  5 19:50:46 2014
@@ -33,7 +33,8 @@ protected:
 
   // Convenience method for getting i'th input files name.
   std::string inputFile(int index) {
-    const InputElement &inputElement = linkingContext()->getInputGraph()[index];
+    const InputElement &inputElement =
+        *linkingContext()->getInputGraph().inputElements()[index];
     if (inputElement.kind() == InputElement::Kind::File)
       return *cast<FileNode>(&inputElement)->getPath(*linkingContext());
     llvm_unreachable("not handling other types of input files");
@@ -41,7 +42,8 @@ protected:
 
   // Convenience method for getting i'th input files name.
   std::string inputFile(int index1, int index2) {
-    Group *group = dyn_cast<Group>(&linkingContext()->getInputGraph()[index1]);
+    Group *group = dyn_cast<Group>(
+        linkingContext()->getInputGraph().inputElements()[index1].get());
     if (!group)
       llvm_unreachable("not handling other types of input files");
     FileNode *file = dyn_cast<FileNode>(group->elements()[index2].get());





More information about the llvm-commits mailing list