summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Dwarf.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-09-19 22:19:37 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-09-19 22:19:37 +0000
commit18a6ade6cd638c1e5d2c7c7d044cec0fec5c63d3 (patch)
tree1a29f131008a3a6390af7403183bbb4830202c1d /include/llvm/Support/Dwarf.h
parent88fae0edcce84920ba7c5685c36f6bd6cfb9b86d (diff)
downloadllvm-18a6ade6cd638c1e5d2c7c7d044cec0fec5c63d3.tar.gz
llvm-18a6ade6cd638c1e5d2c7c7d044cec0fec5c63d3.tar.bz2
llvm-18a6ade6cd638c1e5d2c7c7d044cec0fec5c63d3.tar.xz
DebugInfo: Improve IR annotation comments for GNU pubthings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Dwarf.h')
-rw-r--r--include/llvm/Support/Dwarf.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/llvm/Support/Dwarf.h b/include/llvm/Support/Dwarf.h
index 20c2200a71..30f268c651 100644
--- a/include/llvm/Support/Dwarf.h
+++ b/include/llvm/Support/Dwarf.h
@@ -17,6 +17,7 @@
#define LLVM_SUPPORT_DWARF_H
#include "llvm/Support/DataTypes.h"
+#include "llvm/ADT/StringRef.h"
namespace llvm {
@@ -801,11 +802,15 @@ enum GDBIndexEntryKind {
GIEK_UNUSED7,
};
+StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind);
+
enum GDBIndexEntryLinkage {
GIEL_EXTERNAL,
GIEL_STATIC
};
+StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage);
+
/// The gnu_pub* kind looks like:
///
/// 0-3 reserved
@@ -816,24 +821,25 @@ enum GDBIndexEntryLinkage {
/// offset of the cu within the debug_info section stored in those 24 bits.
struct PubIndexEntryDescriptor {
GDBIndexEntryKind Kind;
- bool Static;
- PubIndexEntryDescriptor(GDBIndexEntryKind Kind, bool Static)
+ GDBIndexEntryLinkage Static;
+ PubIndexEntryDescriptor(GDBIndexEntryKind Kind, GDBIndexEntryLinkage Static)
: Kind(Kind), Static(Static) {}
/* implicit */ PubIndexEntryDescriptor(GDBIndexEntryKind Kind)
- : Kind(Kind), Static(false) {}
+ : Kind(Kind), Static(GIEL_EXTERNAL) {}
explicit PubIndexEntryDescriptor(uint8_t Value)
: Kind(static_cast<GDBIndexEntryKind>((Value & KIND_MASK) >>
KIND_OFFSET)),
- Static(Value & STATIC_MASK) {}
+ Static(static_cast<GDBIndexEntryLinkage>((Value & LINKAGE_MASK) >>
+ LINKAGE_OFFSET)) {}
uint8_t toBits() {
- return Kind << KIND_OFFSET | Static << STATIC_OFFSET;
+ return Kind << KIND_OFFSET | Static << LINKAGE_OFFSET;
}
private:
enum {
KIND_OFFSET = 4,
KIND_MASK = 7 << KIND_OFFSET,
- STATIC_OFFSET = 7,
- STATIC_MASK = 1 << STATIC_OFFSET
+ LINKAGE_OFFSET = 7,
+ LINKAGE_MASK = 1 << LINKAGE_OFFSET
};
};