diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-24 10:20:30 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-24 10:20:30 +0000 |
commit | d7a32ea4b86c04ba0c4736f803527eb393a40867 (patch) | |
tree | 1b09dcd2e51416a33c0b030346842e8ea6dd3e38 /llvm/lib/Object/Object.cpp | |
parent | 595348228569c587e14bf8cea1c4fdf1b503c104 (diff) | |
download | llvm-d7a32ea4b86c04ba0c4736f803527eb393a40867.zip llvm-d7a32ea4b86c04ba0c4736f803527eb393a40867.tar.gz llvm-d7a32ea4b86c04ba0c4736f803527eb393a40867.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Object/Object.cpp')
-rw-r--r-- | llvm/lib/Object/Object.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 |