From d7a32ea4b86c04ba0c4736f803527eb393a40867 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 24 Jun 2015 10:20:30 +0000 Subject: Change how symbol sizes are handled in lib/Object. COFF and MachO only define symbol sizes for common symbols. Reflect that in the class hierarchy by having a method for common symbols only in the base and a general one in ELF. This avoids the need of using a magic value for the size, which had a few problems * Most callers didn't check for it. * The ones that did could not tell the magic value from a file actually having that value. llvm-svn: 240529 --- llvm/lib/Object/Object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/Object.cpp') diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp index 85f2436..42da2e4 100644 --- a/llvm/lib/Object/Object.cpp +++ b/llvm/lib/Object/Object.cpp @@ -187,7 +187,7 @@ uint64_t LLVMGetSymbolAddress(LLVMSymbolIteratorRef SI) { } uint64_t LLVMGetSymbolSize(LLVMSymbolIteratorRef SI) { - return (*unwrap(SI))->getSize(); + return (*unwrap(SI))->getCommonSize(); } // RelocationRef accessors -- cgit v1.1