summaryrefslogtreecommitdiff
path: root/tools/obj2yaml
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-11-05 20:47:35 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-11-05 20:47:35 +0000
commit5563be0f4fbdb84334e25cd0b72e40a6b560390d (patch)
tree3734cadcdd99a87a2912c280631de1037b647c7a /tools/obj2yaml
parent65c79795559fc8224f4a65890736e81d1d4bf714 (diff)
Add accessor to get 'visibility' part of st_other field
This new `getVisibility()` function will also be used in the LLD code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/obj2yaml')
-rw-r--r--tools/obj2yaml/elf2yaml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/obj2yaml/elf2yaml.cpp b/tools/obj2yaml/elf2yaml.cpp
index 8b53ee770a6..bff28496db1 100644
--- a/tools/obj2yaml/elf2yaml.cpp
+++ b/tools/obj2yaml/elf2yaml.cpp
@@ -133,7 +133,7 @@ std::error_code ELFDumper<ELFT>::dumpSymbol(Elf_Sym_Iter Sym,
S.Type = Sym->getType();
S.Value = Sym->st_value;
S.Size = Sym->st_size;
- S.Visibility = Sym->st_other & 0x3;
+ S.Visibility = Sym->getVisibility();
ErrorOr<StringRef> NameOrErr = Obj.getSymbolName(Sym);
if (std::error_code EC = NameOrErr.getError())