diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /lib/Object/SymbolSize.cpp | |
parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) |
Notes
Diffstat (limited to 'lib/Object/SymbolSize.cpp')
-rw-r--r-- | lib/Object/SymbolSize.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Object/SymbolSize.cpp b/lib/Object/SymbolSize.cpp index dd49d5f116b3..004fb1b07546 100644 --- a/lib/Object/SymbolSize.cpp +++ b/lib/Object/SymbolSize.cpp @@ -66,6 +66,10 @@ llvm::object::computeSymbolSizes(const ObjectFile &O) { Addresses.push_back( {O.symbol_end(), Address + Size, 0, getSectionID(O, Sec)}); } + + if (Addresses.empty()) + return Ret; + array_pod_sort(Addresses.begin(), Addresses.end(), compareAddress); // Compute the size as the gap to the next symbol |