summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Object/SymbolSize.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Object/SymbolSize.cpp b/llvm/lib/Object/SymbolSize.cpp
index dd49d5f116b..004fb1b0754 100644
--- a/llvm/lib/Object/SymbolSize.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud