aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/BinaryFormat/Dwarf.cpp
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2020-06-02 12:16:51 +0700
committerIgor Kudrin <ikudrin@accesssoftek.com>2020-06-02 17:55:30 +0700
commit5e296e3db710ea34c535f9f6a4dd3973ba8d3f74 (patch)
treedfe4b862021bf17d8c9c54765786265b502afbb4 /llvm/lib/BinaryFormat/Dwarf.cpp
parentb596ecdd574e3ec717f71950370d2f58ae44296f (diff)
downloadllvm-5e296e3db710ea34c535f9f6a4dd3973ba8d3f74.zip
llvm-5e296e3db710ea34c535f9f6a4dd3973ba8d3f74.tar.gz
llvm-5e296e3db710ea34c535f9f6a4dd3973ba8d3f74.tar.bz2
[DebugInfo] Extract a helper function to return the DWARF format name, NFC [1/10]
Differential Revision: https://reviews.llvm.org/D80523
Diffstat (limited to 'llvm/lib/BinaryFormat/Dwarf.cpp')
-rw-r--r--llvm/lib/BinaryFormat/Dwarf.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index 30c7e9c..08ecd77 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -770,6 +770,16 @@ bool llvm::dwarf::isValidFormForVersion(Form F, unsigned Version,
return ExtensionsOk;
}
+StringRef llvm::dwarf::FormatString(DwarfFormat Format) {
+ switch (Format) {
+ case DWARF32:
+ return "DWARF32";
+ case DWARF64:
+ return "DWARF64";
+ }
+ return StringRef();
+}
+
constexpr char llvm::dwarf::EnumTraits<Attribute>::Type[];
constexpr char llvm::dwarf::EnumTraits<Form>::Type[];
constexpr char llvm::dwarf::EnumTraits<Index>::Type[];