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

llvm-svn: 262926
This commit is contained in:
Benjamin Kramer 2016-03-08 14:02:46 +00:00
parent 77b93ad471
commit 39988a03a5
1 changed files with 1 additions and 1 deletions

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;