[gold] Avoid assertion failures when taking a pointer to an empty vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2016-03-08 14:02:46 +00:00
parent 8a96b704a3
commit b644c0ae0a

View File

@ -620,7 +620,7 @@ static void freeSymName(ld_plugin_symbol &Sym) {
/// Helper to get a file's symbols and a view into it via gold callbacks.
static const void *getSymbolsAndView(claimed_file &F) {
ld_plugin_status status = get_symbols(F.handle, F.syms.size(), &F.syms[0]);
ld_plugin_status status = get_symbols(F.handle, F.syms.size(), F.syms.data());
if (status == LDPS_NO_SYMS)
return nullptr;