[llvm] r190343 - Add constant defines for gnu pubnames and gnu pubtypes - they're used
Eric Christopher
echristo at gmail.com
Mon Sep 9 13:03:11 PDT 2013
Author: echristo
Date: Mon Sep 9 15:03:11 2013
New Revision: 190343
URL: http://llvm.org/viewvc/llvm-project?rev=190343&view=rev
Log:
Add constant defines for gnu pubnames and gnu pubtypes - they're used
for the gdb index as the names convey.
Modified:
llvm/trunk/include/llvm/Support/Dwarf.h
llvm/trunk/lib/Support/Dwarf.cpp
Modified: llvm/trunk/include/llvm/Support/Dwarf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=190343&r1=190342&r2=190343&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Dwarf.h (original)
+++ llvm/trunk/include/llvm/Support/Dwarf.h Mon Sep 9 15:03:11 2013
@@ -789,6 +789,23 @@ enum AcceleratorTable {
/// AtomTypeString - Return the string for the specified Atom type.
const char *AtomTypeString(unsigned Atom);
+// Constants for the GNU pubnames/pubtypes extensions supporting gdb index.
+enum GDBIndex {
+ // Special value to indicate no attributes are present.
+ GDB_INDEX_SYMBOL_KIND_NONE = 0,
+ GDB_INDEX_SYMBOL_KIND_TYPE = 1,
+ GDB_INDEX_SYMBOL_KIND_VARIABLE = 2,
+ GDB_INDEX_SYMBOL_KIND_FUNCTION = 3,
+ GDB_INDEX_SYMBOL_KIND_OTHER = 4,
+ // 3 unused bits.
+ GDB_INDEX_SYMBOL_KIND_UNUSED5 = 5,
+ GDB_INDEX_SYMBOL_KIND_UNUSED6 = 6,
+ GDB_INDEX_SYMBOL_KIND_UNUSED7 = 7
+};
+
+/// GDBIndexTypeString - Return the string for the specified index type.
+const char *GDBIndexTypeString(unsigned Kind);
+
} // End of namespace dwarf
} // End of namespace llvm
Modified: llvm/trunk/lib/Support/Dwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Dwarf.cpp?rev=190343&r1=190342&r2=190343&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Dwarf.cpp (original)
+++ llvm/trunk/lib/Support/Dwarf.cpp Mon Sep 9 15:03:11 2013
@@ -739,3 +739,26 @@ const char *llvm::dwarf::AtomTypeString(
}
return 0;
}
+
+const char *llvm::dwarf::GDBIndexTypeString(unsigned Kind) {
+ switch (Kind) {
+ case GDB_INDEX_SYMBOL_KIND_NONE:
+ return "case GDB_INDEX_SYMBOL_KIND_NONE";
+ case GDB_INDEX_SYMBOL_KIND_TYPE:
+ return "case GDB_INDEX_SYMBOL_KIND_TYPE";
+ case GDB_INDEX_SYMBOL_KIND_VARIABLE:
+ return "case GDB_INDEX_SYMBOL_KIND_VARIABLE";
+ case GDB_INDEX_SYMBOL_KIND_FUNCTION:
+ return "case GDB_INDEX_SYMBOL_KIND_FUNCTION";
+ case GDB_INDEX_SYMBOL_KIND_OTHER:
+ return "case GDB_INDEX_SYMBOL_KIND_OTHER";
+ // 3 unused bits.
+ case GDB_INDEX_SYMBOL_KIND_UNUSED5:
+ return "case GDB_INDEX_SYMBOL_KIND_UNUSED5";
+ case GDB_INDEX_SYMBOL_KIND_UNUSED6:
+ return "case GDB_INDEX_SYMBOL_KIND_UNUSED6";
+ case GDB_INDEX_SYMBOL_KIND_UNUSED7:
+ return "case GDB_INDEX_SYMBOL_KIND_UNUSED7";
+ }
+ return 0;
+}
More information about the llvm-commits
mailing list