[lld] r285776 - Use ArrayRef instead of const std::vector.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 17:29:06 PDT 2016


Author: ruiu
Date: Tue Nov  1 19:29:06 2016
New Revision: 285776

URL: http://llvm.org/viewvc/llvm-project?rev=285776&view=rev
Log:
Use ArrayRef instead of const std::vector.

Modified:
    lld/trunk/ELF/SymbolTable.h

Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=285776&r1=285775&r2=285776&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Tue Nov  1 19:29:06 2016
@@ -44,19 +44,10 @@ public:
   void addFile(InputFile *File);
   void addCombinedLtoObject();
 
-  llvm::ArrayRef<Symbol *> getSymbols() const { return SymVector; }
-
-  const std::vector<ObjectFile<ELFT> *> &getObjectFiles() const {
-    return ObjectFiles;
-  }
-
-  const std::vector<BinaryFile *> &getBinaryFiles() const {
-    return BinaryFiles;
-  }
-
-  const std::vector<SharedFile<ELFT> *> &getSharedFiles() const {
-    return SharedFiles;
-  }
+  ArrayRef<Symbol *> getSymbols() const { return SymVector; }
+  ArrayRef<ObjectFile<ELFT> *> getObjectFiles() const { return ObjectFiles; }
+  ArrayRef<BinaryFile *> getBinaryFiles() const { return BinaryFiles; }
+  ArrayRef<SharedFile<ELFT> *> getSharedFiles() const { return SharedFiles; }
 
   DefinedRegular<ELFT> *addAbsolute(StringRef Name,
                                     uint8_t Visibility = llvm::ELF::STV_HIDDEN);




More information about the llvm-commits mailing list