[PATCH] D32587: Add llvm::object::getELFSectionTypeName()
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 03:14:54 PDT 2017
arichardson added inline comments.
================
Comment at: lib/Object/ELF.cpp:236
+ default:
+ return "";
+ }
----------------
ruiu wrote:
> It is probably more convenient to return 0x<hex> from this function for unknown types.
This would mean that llvm-readobj would output `Type: 0x1234567 (0x1234567)` as it always appends the hex value. Also we can't return a const char* then and would need to return std::string.
As the name of the function is getELFSectionTypeName() I think it is fine to return "" for unknown names because there is no known name for that section type.
https://reviews.llvm.org/D32587
More information about the llvm-commits
mailing list