[lld] r262072 - Make SymbolBodies private.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 13:31:34 PST 2016
Author: rafael
Date: Fri Feb 26 15:31:34 2016
New Revision: 262072
URL: http://llvm.org/viewvc/llvm-project?rev=262072&view=rev
Log:
Make SymbolBodies private.
This makes BitcodeFile a bit closer to ObjectFile.
If anyone prefers I can go the other way and delete getSymbols from
ObjectFile.
Modified:
lld/trunk/ELF/InputFiles.h
lld/trunk/ELF/SymbolTable.cpp
Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=262072&r1=262071&r2=262072&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Fri Feb 26 15:31:34 2016
@@ -184,10 +184,10 @@ public:
explicit BitcodeFile(MemoryBufferRef M);
static bool classof(const InputFile *F);
void parse();
-
- std::vector<SymbolBody *> SymbolBodies;
+ ArrayRef<SymbolBody *> getSymbols() { return SymbolBodies; }
private:
+ std::vector<SymbolBody *> SymbolBodies;
llvm::BumpPtrAllocator Alloc;
llvm::StringSaver Saver{Alloc};
};
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=262072&r1=262071&r2=262072&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Fri Feb 26 15:31:34 2016
@@ -83,7 +83,7 @@ void SymbolTable<ELFT>::addFile(std::uni
if (auto *F = dyn_cast<BitcodeFile>(FileP)) {
BitcodeFiles.emplace_back(cast<BitcodeFile>(File.release()));
F->parse();
- for (SymbolBody *B : F->SymbolBodies)
+ for (SymbolBody *B : F->getSymbols())
resolve(B);
return;
}
More information about the llvm-commits
mailing list