[llvm] r269868 - [codeview] Move Symbol / Type enum defs into CodeView.h

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 16:57:10 PDT 2016


Author: zturner
Date: Tue May 17 18:57:10 2016
New Revision: 269868

URL: http://llvm.org/viewvc/llvm-project?rev=269868&view=rev
Log:
[codeview] Move Symbol / Type enum defs into CodeView.h

This fixes a build breakage that would otherwise only be fixable
through a circular header dependency.

Modified:
    llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h
    llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h
    llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h

Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h?rev=269868&r1=269867&r2=269868&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h Tue May 17 18:57:10 2016
@@ -16,6 +16,37 @@
 namespace llvm {
 namespace codeview {
 
+/// Distinguishes individual records in .debug$T section or PDB type stream. The
+/// documentation and headers talk about this as the "leaf" type.
+enum class TypeRecordKind : uint16_t {
+#define TYPE_RECORD(lf_ename, value, name) name = value,
+#include "TypeRecords.def"
+  // FIXME: Add serialization support
+  FieldList = 0x1203,
+  BitField = 0x1205,
+};
+
+/// Duplicate copy of the above enum, but using the official CV names. Useful
+/// for reference purposes and when dealing with unknown record types.
+enum TypeLeafKind : uint16_t {
+#define CV_TYPE(name, val) name = val,
+#include "TypeRecords.def"
+};
+
+/// Distinguishes individual records in the Symbols subsection of a .debug$S
+/// section. Equivalent to SYM_ENUM_e in cvinfo.h.
+enum class SymbolRecordKind : uint16_t {
+#define SYMBOL_RECORD(lf_ename, value, name) name = value,
+#include "CVSymbolTypes.def"
+};
+
+/// Duplicate copy of the above enum, but using the official CV names. Useful
+/// for reference purposes and when dealing with unknown record types.
+enum SymbolKind : uint16_t {
+#define CV_SYMBOL(name, val) name = val,
+#include "CVSymbolTypes.def"
+};
+
 #define CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(Class)                            \
   inline Class operator|(Class a, Class b) {                                   \
     return static_cast<Class>(                                                 \

Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h?rev=269868&r1=269867&r2=269868&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h Tue May 17 18:57:10 2016
@@ -22,20 +22,6 @@ using llvm::support::ulittle16_t;
 using llvm::support::ulittle32_t;
 using llvm::support::little32_t;
 
-/// Distinguishes individual records in the Symbols subsection of a .debug$S
-/// section. Equivalent to SYM_ENUM_e in cvinfo.h.
-enum class SymbolRecordKind : uint16_t {
-#define SYMBOL_RECORD(lf_ename, value, name) name = value,
-#include "CVSymbolTypes.def"
-};
-
-/// Duplicate copy of the above enum, but using the official CV names. Useful
-/// for reference purposes and when dealing with unknown record types.
-enum SymbolKind : uint16_t {
-#define CV_SYMBOL(name, val) name = val,
-#include "CVSymbolTypes.def"
-};
-
 // S_GPROC32, S_LPROC32, S_GPROC32_ID, S_LPROC32_ID, S_LPROC32_DPC or
 // S_LPROC32_DPC_ID
 struct ProcSym {

Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h?rev=269868&r1=269867&r2=269868&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h Tue May 17 18:57:10 2016
@@ -26,23 +26,6 @@ using llvm::support::little32_t;
 using llvm::support::ulittle16_t;
 using llvm::support::ulittle32_t;
 
-/// Distinguishes individual records in .debug$T section or PDB type stream. The
-/// documentation and headers talk about this as the "leaf" type.
-enum class TypeRecordKind : uint16_t {
-#define TYPE_RECORD(lf_ename, value, name) name = value,
-#include "TypeRecords.def"
-  // FIXME: Add serialization support
-  FieldList = 0x1203,
-  BitField = 0x1205,
-};
-
-/// Duplicate copy of the above enum, but using the official CV names. Useful
-/// for reference purposes and when dealing with unknown record types.
-enum TypeLeafKind : uint16_t {
-#define CV_TYPE(name, val) name = val,
-#include "TypeRecords.def"
-};
-
 /// Equvalent to CV_fldattr_t in cvinfo.h.
 struct MemberAttributes {
   ulittle16_t Attrs;




More information about the llvm-commits mailing list