diff options
author | Pavel Labath <labath@google.com> | 2018-01-22 09:41:36 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-01-22 09:41:36 +0000 |
commit | 44197df7a371194b60eda04093a541a8c4d6032a (patch) | |
tree | 1a2640022cfb0360f9cba0cc9be0fc3d8149f18f /llvm/lib/BinaryFormat/Dwarf.cpp | |
parent | b0d49a604b6fc7a9327ddcac1e39faf29bd51458 (diff) | |
download | bcm5719-llvm-44197df7a371194b60eda04093a541a8c4d6032a.tar.gz bcm5719-llvm-44197df7a371194b60eda04093a541a8c4d6032a.zip |
[BinaryFormat] Add .debug_names support
Summary:
This adds a definition of the .debug_names section and the new constants
(DW_IDX_???) which are used in it.
Reviewers: JDevlieghere, aprantl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42296
llvm-svn: 323084
Diffstat (limited to 'llvm/lib/BinaryFormat/Dwarf.cpp')
-rw-r--r-- | llvm/lib/BinaryFormat/Dwarf.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp index 86e3b02577f..593ce7a1965 100644 --- a/llvm/lib/BinaryFormat/Dwarf.cpp +++ b/llvm/lib/BinaryFormat/Dwarf.cpp @@ -567,6 +567,17 @@ StringRef llvm::dwarf::AttributeValueString(uint16_t Attr, unsigned Val) { return StringRef(); } +StringRef llvm::dwarf::IndexString(unsigned Idx) { + switch (Idx) { + default: + return StringRef(); +#define HANDLE_DW_IDX(ID, NAME) \ + case DW_IDX_##NAME: \ + return "DW_IDX_" #NAME; +#include "llvm/BinaryFormat/Dwarf.def" + } +} + bool llvm::dwarf::isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk) { if (FormVendor(F) == DWARF_VENDOR_DWARF) { |