[llvm] r257712 - [codeview] Share more enums across the writer and the dumper
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 15:44:57 PST 2016
Author: rnk
Date: Wed Jan 13 17:44:57 2016
New Revision: 257712
URL: http://llvm.org/viewvc/llvm-project?rev=257712&view=rev
Log:
[codeview] Share more enums across the writer and the dumper
Moves some .def files into include/DebugInfo/CodeView.
Aslo remove a 'using namespace' directive from a header in readobj and
update the uses of the endian helper types to compensate.
Added:
llvm/trunk/include/llvm/DebugInfo/CodeView/CVLeafTypes.def
- copied, changed from r257709, llvm/trunk/tools/llvm-readobj/CVLeafTypes.def
llvm/trunk/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def
- copied, changed from r257709, llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def
Removed:
llvm/trunk/tools/llvm-readobj/CVLeafTypes.def
llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def
Modified:
llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h
llvm/trunk/include/llvm/Support/COFF.h
llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
llvm/trunk/tools/llvm-readobj/CodeView.h
llvm/trunk/tools/llvm-readobj/StreamWriter.h
Copied: llvm/trunk/include/llvm/DebugInfo/CodeView/CVLeafTypes.def (from r257709, llvm/trunk/tools/llvm-readobj/CVLeafTypes.def)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CVLeafTypes.def?p2=llvm/trunk/include/llvm/DebugInfo/CodeView/CVLeafTypes.def&p1=llvm/trunk/tools/llvm-readobj/CVLeafTypes.def&r1=257709&r2=257712&rev=257712&view=diff
==============================================================================
(empty)
Copied: llvm/trunk/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def (from r257709, llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def?p2=llvm/trunk/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def&p1=llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def&r1=257709&r2=257712&rev=257712&view=diff
==============================================================================
(empty)
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=257712&r1=257711&r2=257712&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/CodeView.h Wed Jan 13 17:44:57 2016
@@ -381,6 +381,13 @@ enum class PointerToMemberRepresentation
GeneralFunction = 0x08 // member function, most general
};
+/// Distinguishes individual records in .debug$T section or PDB type stream. The
+/// documentation and headers talk about this as the "leaf" type.
+enum TypeLeafKind : uint16_t {
+#define LEAF_TYPE(name, val) name = val,
+#include "CVLeafTypes.def"
+};
+
enum class TypeRecordKind : uint16_t {
None = 0,
Modified: llvm/trunk/include/llvm/Support/COFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/COFF.h?rev=257712&r1=257711&r2=257712&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/COFF.h (original)
+++ llvm/trunk/include/llvm/Support/COFF.h Wed Jan 13 17:44:57 2016
@@ -668,15 +668,6 @@ namespace COFF {
enum CodeViewIdentifiers {
DEBUG_LINE_TABLES_HAVE_COLUMN_RECORDS = 0x1,
DEBUG_SECTION_MAGIC = 0x4,
- DEBUG_SYMBOL_SUBSECTION = 0xF1,
- DEBUG_LINE_TABLE_SUBSECTION = 0xF2,
- DEBUG_STRING_TABLE_SUBSECTION = 0xF3,
- DEBUG_INDEX_SUBSECTION = 0xF4,
-
- // Symbol subsections are split into records of different types.
- DEBUG_SYMBOL_TYPE_LOCAL_PROC_START = 0x1146,
- DEBUG_SYMBOL_TYPE_PROC_START = 0x1147,
- DEBUG_SYMBOL_TYPE_PROC_END = 0x114F
};
inline bool isReservedSectionNumber(int32_t SectionNumber) {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp?rev=257712&r1=257711&r2=257712&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp Wed Jan 13 17:44:57 2016
@@ -12,10 +12,14 @@
//===----------------------------------------------------------------------===//
#include "WinCodeViewLineTables.h"
+#include "llvm/DebugInfo/CodeView/CodeView.h"
+#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/COFF.h"
+using namespace llvm::codeview;
+
namespace llvm {
StringRef WinCodeViewLineTables::getFullFilepath(const MDNode *S) {
@@ -129,6 +133,9 @@ void WinCodeViewLineTables::endModule()
if (FnDebugInfo.empty())
return;
+ // FIXME: For functions that are comdat, we should emit separate .debug$S
+ // sections that are comdat associative with the main function instead of
+ // having one big .debug$S section.
assert(Asm != nullptr);
Asm->OutStreamer->SwitchSection(
Asm->getObjFileLowering().getCOFFDebugSymbolsSection());
@@ -146,7 +153,7 @@ void WinCodeViewLineTables::endModule()
// This subsection holds a file index to offset in string table table.
Asm->OutStreamer->AddComment("File index to string table offset subsection");
- Asm->EmitInt32(COFF::DEBUG_INDEX_SUBSECTION);
+ Asm->EmitInt32(unsigned(ModuleSubstreamKind::FileChecksums));
size_t NumFilenames = FileNameRegistry.Infos.size();
Asm->EmitInt32(8 * NumFilenames);
for (size_t I = 0, E = FileNameRegistry.Filenames.size(); I != E; ++I) {
@@ -159,7 +166,7 @@ void WinCodeViewLineTables::endModule()
// This subsection holds the string table.
Asm->OutStreamer->AddComment("String table");
- Asm->EmitInt32(COFF::DEBUG_STRING_TABLE_SUBSECTION);
+ Asm->EmitInt32(unsigned(ModuleSubstreamKind::StringTable));
Asm->EmitInt32(FileNameRegistry.LastOffset);
// The payload starts with a null character.
Asm->EmitInt8(0);
@@ -213,7 +220,7 @@ void WinCodeViewLineTables::emitDebugInf
MCSymbol *SymbolsBegin = Asm->MMI->getContext().createTempSymbol(),
*SymbolsEnd = Asm->MMI->getContext().createTempSymbol();
Asm->OutStreamer->AddComment("Symbol subsection for " + Twine(FuncName));
- Asm->EmitInt32(COFF::DEBUG_SYMBOL_SUBSECTION);
+ Asm->EmitInt32(unsigned(ModuleSubstreamKind::Symbols));
EmitLabelDiff(*Asm->OutStreamer, SymbolsBegin, SymbolsEnd);
Asm->OutStreamer->EmitLabel(SymbolsBegin);
{
@@ -222,7 +229,8 @@ void WinCodeViewLineTables::emitDebugInf
EmitLabelDiff(*Asm->OutStreamer, ProcSegmentBegin, ProcSegmentEnd, 2);
Asm->OutStreamer->EmitLabel(ProcSegmentBegin);
- Asm->EmitInt16(COFF::DEBUG_SYMBOL_TYPE_PROC_START);
+ Asm->EmitInt16(unsigned(SymbolRecordKind::S_GPROC32_ID));
+
// Some bytes of this segment don't seem to be required for basic debugging,
// so just fill them with zeroes.
Asm->OutStreamer->EmitFill(12, 0);
@@ -240,7 +248,7 @@ void WinCodeViewLineTables::emitDebugInf
// We're done with this function.
Asm->EmitInt16(0x0002);
- Asm->EmitInt16(COFF::DEBUG_SYMBOL_TYPE_PROC_END);
+ Asm->EmitInt16(unsigned(SymbolRecordKind::S_PROC_ID_END));
}
Asm->OutStreamer->EmitLabel(SymbolsEnd);
// Every subsection must be aligned to a 4-byte boundary.
@@ -264,7 +272,7 @@ void WinCodeViewLineTables::emitDebugInf
// Emit a line table subsection, required to do PC-to-file:line lookup.
Asm->OutStreamer->AddComment("Line table subsection for " + Twine(FuncName));
- Asm->EmitInt32(COFF::DEBUG_LINE_TABLE_SUBSECTION);
+ Asm->EmitInt32(unsigned(ModuleSubstreamKind::Lines));
MCSymbol *LineTableBegin = Asm->MMI->getContext().createTempSymbol(),
*LineTableEnd = Asm->MMI->getContext().createTempSymbol();
EmitLabelDiff(*Asm->OutStreamer, LineTableBegin, LineTableEnd);
Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=257712&r1=257711&r2=257712&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Wed Jan 13 17:44:57 2016
@@ -24,6 +24,10 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
+#include "llvm/DebugInfo/CodeView/CodeView.h"
+#include "llvm/DebugInfo/CodeView/TypeIndex.h"
+#include "llvm/DebugInfo/CodeView/TypeRecord.h"
+#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/COFF.h"
@@ -42,6 +46,7 @@
using namespace llvm;
using namespace llvm::object;
using namespace llvm::codeview;
+using namespace llvm::support;
using namespace llvm::Win64EH;
namespace {
@@ -608,9 +613,9 @@ static const EnumEntry<SimpleTypeKind> S
{"__bool64*", SimpleTypeKind::Boolean64},
};
-static const EnumEntry<LeafType> LeafTypeNames[] = {
-#define LEAF_TYPE(name, val) LLVM_READOBJ_ENUM_ENT(LeafType, name),
-#include "CVLeafTypes.def"
+static const EnumEntry<TypeLeafKind> LeafTypeNames[] = {
+#define LEAF_TYPE(name, val) LLVM_READOBJ_ENUM_ENT(TypeLeafKind, name),
+#include "llvm/DebugInfo/CodeView/CVLeafTypes.def"
};
static const EnumEntry<uint8_t> PtrKindNames[] = {
@@ -1205,8 +1210,8 @@ void COFFDumper::printCodeViewSymbolsSub
Data = Data.drop_front(Rec->RecordLength - 2);
- SymType Type = static_cast<SymType>(uint16_t(Rec->RecordType));
- switch (Type) {
+ SymbolRecordKind Kind = Rec->getKind();
+ switch (Kind) {
case S_LPROC32:
case S_GPROC32:
case S_GPROC32_ID:
@@ -1555,7 +1560,7 @@ void COFFDumper::printCodeViewSymbolsSub
default: {
DictScope S(W, "UnknownSym");
- W.printHex("Type", unsigned(Type));
+ W.printHex("Kind", unsigned(Kind));
W.printHex("Size", Rec->RecordLength);
W.printBinaryBlock("SymData", SymData);
break;
@@ -1564,7 +1569,7 @@ void COFFDumper::printCodeViewSymbolsSub
}
}
-StringRef getRemainingTypeBytes(const TypeRecord *Rec, const char *Start) {
+StringRef getRemainingTypeBytes(const TypeRecordPrefix *Rec, const char *Start) {
ptrdiff_t StartOffset = Start - reinterpret_cast<const char *>(Rec);
size_t RecSize = Rec->Len + 2;
assert(StartOffset >= 0 && "negative start-offset!");
@@ -1573,7 +1578,7 @@ StringRef getRemainingTypeBytes(const Ty
return StringRef(Start, RecSize - StartOffset);
}
-StringRef getRemainingBytesAsString(const TypeRecord *Rec, const char *Start) {
+StringRef getRemainingBytesAsString(const TypeRecordPrefix *Rec, const char *Start) {
StringRef Remaining = getRemainingTypeBytes(Rec, Start);
StringRef Leading, Trailing;
std::tie(Leading, Trailing) = Remaining.split('\0');
@@ -1617,7 +1622,7 @@ void COFFDumper::printTypeIndex(StringRe
W.printHex(FieldName, TI.getIndex());
}
-static StringRef getLeafTypeName(LeafType LT) {
+static StringRef getLeafTypeName(TypeLeafKind LT) {
switch (LT) {
case LF_STRING_ID: return "StringId";
case LF_FIELDLIST: return "FieldList";
@@ -1660,9 +1665,9 @@ void COFFDumper::printCodeViewTypeSectio
Data = Data.drop_front(4);
while (!Data.empty()) {
- const TypeRecord *Rec;
+ const TypeRecordPrefix *Rec;
error(consumeObject(Data, Rec));
- auto Leaf = static_cast<LeafType>(uint16_t(Rec->Leaf));
+ auto Leaf = static_cast<TypeLeafKind>(uint16_t(Rec->Leaf));
// This record is 'Len - 2' bytes, and the next one starts immediately
// afterwards.
@@ -1673,7 +1678,7 @@ void COFFDumper::printCodeViewTypeSectio
StringRef LeafName = getLeafTypeName(Leaf);
DictScope S(W, LeafName);
unsigned NextTypeIndex = 0x1000 + CVUDTNames.size();
- W.printEnum("LeafType", unsigned(Leaf), makeArrayRef(LeafTypeNames));
+ W.printEnum("TypeLeafKind", unsigned(Leaf), makeArrayRef(LeafTypeNames));
W.printHex("TypeIndex", NextTypeIndex);
// Fill this in inside the switch to get something in CVUDTNames.
Removed: llvm/trunk/tools/llvm-readobj/CVLeafTypes.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/CVLeafTypes.def?rev=257711&view=auto
==============================================================================
--- llvm/trunk/tools/llvm-readobj/CVLeafTypes.def (original)
+++ llvm/trunk/tools/llvm-readobj/CVLeafTypes.def (removed)
@@ -1,211 +0,0 @@
-//===-- CVLeafTypes.def - All CodeView leaf types ---------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// See LEAF_ENUM_e in cvinfo.h. This should match the constants there.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LEAF_TYPE
-#define LEAF_TYPE(ename, value)
-#endif
-
-// 16 bit type records.
-LEAF_TYPE(LF_MODIFIER_16t, 0x0001)
-LEAF_TYPE(LF_POINTER_16t, 0x0002)
-LEAF_TYPE(LF_ARRAY_16t, 0x0003)
-LEAF_TYPE(LF_CLASS_16t, 0x0004)
-LEAF_TYPE(LF_STRUCTURE_16t, 0x0005)
-LEAF_TYPE(LF_UNION_16t, 0x0006)
-LEAF_TYPE(LF_ENUM_16t, 0x0007)
-LEAF_TYPE(LF_PROCEDURE_16t, 0x0008)
-LEAF_TYPE(LF_MFUNCTION_16t, 0x0009)
-LEAF_TYPE(LF_VTSHAPE, 0x000a)
-LEAF_TYPE(LF_COBOL0_16t, 0x000b)
-LEAF_TYPE(LF_COBOL1, 0x000c)
-LEAF_TYPE(LF_BARRAY_16t, 0x000d)
-LEAF_TYPE(LF_LABEL, 0x000e)
-LEAF_TYPE(LF_NULLLEAF, 0x000f) // LF_NULL
-LEAF_TYPE(LF_NOTTRAN, 0x0010)
-LEAF_TYPE(LF_DIMARRAY_16t, 0x0011)
-LEAF_TYPE(LF_VFTPATH_16t, 0x0012)
-LEAF_TYPE(LF_PRECOMP_16t, 0x0013)
-LEAF_TYPE(LF_ENDPRECOMP, 0x0014)
-LEAF_TYPE(LF_OEM_16t, 0x0015)
-LEAF_TYPE(LF_TYPESERVER_ST, 0x0016)
-
-LEAF_TYPE(LF_SKIP_16t, 0x0200)
-LEAF_TYPE(LF_ARGLIST_16t, 0x0201)
-LEAF_TYPE(LF_DEFARG_16t, 0x0202)
-LEAF_TYPE(LF_LIST, 0x0203)
-LEAF_TYPE(LF_FIELDLIST_16t, 0x0204)
-LEAF_TYPE(LF_DERIVED_16t, 0x0205)
-LEAF_TYPE(LF_BITFIELD_16t, 0x0206)
-LEAF_TYPE(LF_METHODLIST_16t, 0x0207)
-LEAF_TYPE(LF_DIMCONU_16t, 0x0208)
-LEAF_TYPE(LF_DIMCONLU_16t, 0x0209)
-LEAF_TYPE(LF_DIMVARU_16t, 0x020a)
-LEAF_TYPE(LF_DIMVARLU_16t, 0x020b)
-LEAF_TYPE(LF_REFSYM, 0x020c)
-
-// 16 bit member types. Generally not length prefixed.
-LEAF_TYPE(LF_BCLASS_16t, 0x0400)
-LEAF_TYPE(LF_VBCLASS_16t, 0x0401)
-LEAF_TYPE(LF_IVBCLASS_16t, 0x0402)
-LEAF_TYPE(LF_ENUMERATE_ST, 0x0403)
-LEAF_TYPE(LF_FRIENDFCN_16t, 0x0404)
-LEAF_TYPE(LF_INDEX_16t, 0x0405)
-LEAF_TYPE(LF_MEMBER_16t, 0x0406)
-LEAF_TYPE(LF_STMEMBER_16t, 0x0407)
-LEAF_TYPE(LF_METHOD_16t, 0x0408)
-LEAF_TYPE(LF_NESTTYPE_16t, 0x0409)
-LEAF_TYPE(LF_VFUNCTAB_16t, 0x040a)
-LEAF_TYPE(LF_FRIENDCLS_16t, 0x040b)
-LEAF_TYPE(LF_ONEMETHOD_16t, 0x040c)
-LEAF_TYPE(LF_VFUNCOFF_16t, 0x040d)
-
-LEAF_TYPE(LF_TI16_MAX, 0x1000)
-
-LEAF_TYPE(LF_MODIFIER, 0x1001)
-LEAF_TYPE(LF_POINTER, 0x1002)
-LEAF_TYPE(LF_ARRAY_ST, 0x1003)
-LEAF_TYPE(LF_CLASS_ST, 0x1004)
-LEAF_TYPE(LF_STRUCTURE_ST, 0x1005)
-LEAF_TYPE(LF_UNION_ST, 0x1006)
-LEAF_TYPE(LF_ENUM_ST, 0x1007)
-LEAF_TYPE(LF_PROCEDURE, 0x1008)
-LEAF_TYPE(LF_MFUNCTION, 0x1009)
-LEAF_TYPE(LF_COBOL0, 0x100a)
-LEAF_TYPE(LF_BARRAY, 0x100b)
-LEAF_TYPE(LF_DIMARRAY_ST, 0x100c)
-LEAF_TYPE(LF_VFTPATH, 0x100d)
-LEAF_TYPE(LF_PRECOMP_ST, 0x100e)
-LEAF_TYPE(LF_OEM, 0x100f)
-LEAF_TYPE(LF_ALIAS_ST, 0x1010)
-LEAF_TYPE(LF_OEM2, 0x1011)
-
-LEAF_TYPE(LF_SKIP, 0x1200)
-LEAF_TYPE(LF_ARGLIST, 0x1201)
-LEAF_TYPE(LF_DEFARG_ST, 0x1202)
-LEAF_TYPE(LF_FIELDLIST, 0x1203)
-LEAF_TYPE(LF_DERIVED, 0x1204)
-LEAF_TYPE(LF_BITFIELD, 0x1205)
-LEAF_TYPE(LF_METHODLIST, 0x1206)
-LEAF_TYPE(LF_DIMCONU, 0x1207)
-LEAF_TYPE(LF_DIMCONLU, 0x1208)
-LEAF_TYPE(LF_DIMVARU, 0x1209)
-LEAF_TYPE(LF_DIMVARLU, 0x120a)
-
-// Member type records. These are generally not length prefixed, and appear
-// inside of a field list record.
-LEAF_TYPE(LF_BCLASS, 0x1400)
-LEAF_TYPE(LF_VBCLASS, 0x1401)
-LEAF_TYPE(LF_IVBCLASS, 0x1402)
-LEAF_TYPE(LF_FRIENDFCN_ST, 0x1403)
-LEAF_TYPE(LF_INDEX, 0x1404)
-LEAF_TYPE(LF_MEMBER_ST, 0x1405)
-LEAF_TYPE(LF_STMEMBER_ST, 0x1406)
-LEAF_TYPE(LF_METHOD_ST, 0x1407)
-LEAF_TYPE(LF_NESTTYPE_ST, 0x1408)
-LEAF_TYPE(LF_VFUNCTAB, 0x1409)
-LEAF_TYPE(LF_FRIENDCLS, 0x140a)
-LEAF_TYPE(LF_ONEMETHOD_ST, 0x140b)
-LEAF_TYPE(LF_VFUNCOFF, 0x140c)
-LEAF_TYPE(LF_NESTTYPEEX_ST, 0x140d)
-LEAF_TYPE(LF_MEMBERMODIFY_ST, 0x140e)
-LEAF_TYPE(LF_MANAGED_ST, 0x140f)
-
-LEAF_TYPE(LF_ST_MAX, 0x1500)
-LEAF_TYPE(LF_TYPESERVER, 0x1501)
-LEAF_TYPE(LF_ENUMERATE, 0x1502)
-LEAF_TYPE(LF_ARRAY, 0x1503)
-LEAF_TYPE(LF_CLASS, 0x1504)
-LEAF_TYPE(LF_STRUCTURE, 0x1505)
-LEAF_TYPE(LF_UNION, 0x1506)
-LEAF_TYPE(LF_ENUM, 0x1507)
-LEAF_TYPE(LF_DIMARRAY, 0x1508)
-LEAF_TYPE(LF_PRECOMP, 0x1509)
-LEAF_TYPE(LF_ALIAS, 0x150a)
-LEAF_TYPE(LF_DEFARG, 0x150b)
-LEAF_TYPE(LF_FRIENDFCN, 0x150c)
-LEAF_TYPE(LF_MEMBER, 0x150d)
-LEAF_TYPE(LF_STMEMBER, 0x150e)
-LEAF_TYPE(LF_METHOD, 0x150f)
-LEAF_TYPE(LF_NESTTYPE, 0x1510)
-LEAF_TYPE(LF_ONEMETHOD, 0x1511)
-LEAF_TYPE(LF_NESTTYPEEX, 0x1512)
-LEAF_TYPE(LF_MEMBERMODIFY, 0x1513)
-LEAF_TYPE(LF_MANAGED, 0x1514)
-LEAF_TYPE(LF_TYPESERVER2, 0x1515)
-LEAF_TYPE(LF_STRIDED_ARRAY, 0x1516)
-LEAF_TYPE(LF_HLSL, 0x1517)
-LEAF_TYPE(LF_MODIFIER_EX, 0x1518)
-LEAF_TYPE(LF_INTERFACE, 0x1519)
-LEAF_TYPE(LF_BINTERFACE, 0x151a)
-LEAF_TYPE(LF_VECTOR, 0x151b)
-LEAF_TYPE(LF_MATRIX, 0x151c)
-LEAF_TYPE(LF_VFTABLE, 0x151d)
-
-// ID leaf records. Subsequent leaf types may be referenced from .debug$S.
-
-LEAF_TYPE(LF_FUNC_ID, 0x1601)
-LEAF_TYPE(LF_MFUNC_ID, 0x1602)
-LEAF_TYPE(LF_BUILDINFO, 0x1603)
-LEAF_TYPE(LF_SUBSTR_LIST, 0x1604)
-LEAF_TYPE(LF_STRING_ID, 0x1605)
-LEAF_TYPE(LF_UDT_SRC_LINE, 0x1606)
-LEAF_TYPE(LF_UDT_MOD_SRC_LINE, 0x1607)
-
-// Numeric leaf types. These are generally contained in other records, and not
-// encountered in the main type stream.
-
-LEAF_TYPE(LF_NUMERIC, 0x8000)
-LEAF_TYPE(LF_CHAR, 0x8000)
-LEAF_TYPE(LF_SHORT, 0x8001)
-LEAF_TYPE(LF_USHORT, 0x8002)
-LEAF_TYPE(LF_LONG, 0x8003)
-LEAF_TYPE(LF_ULONG, 0x8004)
-LEAF_TYPE(LF_REAL32, 0x8005)
-LEAF_TYPE(LF_REAL64, 0x8006)
-LEAF_TYPE(LF_REAL80, 0x8007)
-LEAF_TYPE(LF_REAL128, 0x8008)
-LEAF_TYPE(LF_QUADWORD, 0x8009)
-LEAF_TYPE(LF_UQUADWORD, 0x800a)
-LEAF_TYPE(LF_REAL48, 0x800b)
-LEAF_TYPE(LF_COMPLEX32, 0x800c)
-LEAF_TYPE(LF_COMPLEX64, 0x800d)
-LEAF_TYPE(LF_COMPLEX80, 0x800e)
-LEAF_TYPE(LF_COMPLEX128, 0x800f)
-LEAF_TYPE(LF_VARSTRING, 0x8010)
-LEAF_TYPE(LF_OCTWORD, 0x8017)
-LEAF_TYPE(LF_UOCTWORD, 0x8018)
-LEAF_TYPE(LF_DECIMAL, 0x8019)
-LEAF_TYPE(LF_DATE, 0x801a)
-LEAF_TYPE(LF_UTF8STRING, 0x801b)
-LEAF_TYPE(LF_REAL16, 0x801c)
-
-// Padding bytes. These are emitted into alignment bytes in the type stream.
-
-LEAF_TYPE(LF_PAD0, 0xf0)
-LEAF_TYPE(LF_PAD1, 0xf1)
-LEAF_TYPE(LF_PAD2, 0xf2)
-LEAF_TYPE(LF_PAD3, 0xf3)
-LEAF_TYPE(LF_PAD4, 0xf4)
-LEAF_TYPE(LF_PAD5, 0xf5)
-LEAF_TYPE(LF_PAD6, 0xf6)
-LEAF_TYPE(LF_PAD7, 0xf7)
-LEAF_TYPE(LF_PAD8, 0xf8)
-LEAF_TYPE(LF_PAD9, 0xf9)
-LEAF_TYPE(LF_PAD10, 0xfa)
-LEAF_TYPE(LF_PAD11, 0xfb)
-LEAF_TYPE(LF_PAD12, 0xfc)
-LEAF_TYPE(LF_PAD13, 0xfd)
-LEAF_TYPE(LF_PAD14, 0xfe)
-LEAF_TYPE(LF_PAD15, 0xff)
-
-#undef LEAF_TYPE
Removed: llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def?rev=257711&view=auto
==============================================================================
--- llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def (original)
+++ llvm/trunk/tools/llvm-readobj/CVSymbolTypes.def (removed)
@@ -1,237 +0,0 @@
-//===-- CVLeafTypes.def - All CodeView leaf types ---------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// See LEAF_ENUM_e in cvinfo.h. This should match the constants there.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef SYMBOL_TYPE
-#define SYMBOL_TYPE(ename, value)
-#endif
-
-// 16 bit symbol types. Not very useful, provided only for reference.
-SYMBOL_TYPE(S_COMPILE , 0x0001)
-SYMBOL_TYPE(S_REGISTER_16t , 0x0002)
-SYMBOL_TYPE(S_CONSTANT_16t , 0x0003)
-SYMBOL_TYPE(S_UDT_16t , 0x0004)
-SYMBOL_TYPE(S_SSEARCH , 0x0005)
-SYMBOL_TYPE(S_END , 0x0006)
-SYMBOL_TYPE(S_SKIP , 0x0007)
-SYMBOL_TYPE(S_CVRESERVE , 0x0008)
-SYMBOL_TYPE(S_OBJNAME_ST , 0x0009)
-SYMBOL_TYPE(S_ENDARG , 0x000a)
-SYMBOL_TYPE(S_COBOLUDT_16t , 0x000b)
-SYMBOL_TYPE(S_MANYREG_16t , 0x000c)
-SYMBOL_TYPE(S_RETURN , 0x000d)
-SYMBOL_TYPE(S_ENTRYTHIS , 0x000e)
-SYMBOL_TYPE(S_BPREL16 , 0x0100)
-SYMBOL_TYPE(S_LDATA16 , 0x0101)
-SYMBOL_TYPE(S_GDATA16 , 0x0102)
-SYMBOL_TYPE(S_PUB16 , 0x0103)
-SYMBOL_TYPE(S_LPROC16 , 0x0104)
-SYMBOL_TYPE(S_GPROC16 , 0x0105)
-SYMBOL_TYPE(S_THUNK16 , 0x0106)
-SYMBOL_TYPE(S_BLOCK16 , 0x0107)
-SYMBOL_TYPE(S_WITH16 , 0x0108)
-SYMBOL_TYPE(S_LABEL16 , 0x0109)
-SYMBOL_TYPE(S_CEXMODEL16 , 0x010a)
-SYMBOL_TYPE(S_VFTABLE16 , 0x010b)
-SYMBOL_TYPE(S_REGREL16 , 0x010c)
-SYMBOL_TYPE(S_BPREL32_16t , 0x0200)
-SYMBOL_TYPE(S_LDATA32_16t , 0x0201)
-SYMBOL_TYPE(S_GDATA32_16t , 0x0202)
-SYMBOL_TYPE(S_PUB32_16t , 0x0203)
-SYMBOL_TYPE(S_LPROC32_16t , 0x0204)
-SYMBOL_TYPE(S_GPROC32_16t , 0x0205)
-SYMBOL_TYPE(S_THUNK32_ST , 0x0206)
-SYMBOL_TYPE(S_BLOCK32_ST , 0x0207)
-SYMBOL_TYPE(S_WITH32_ST , 0x0208)
-SYMBOL_TYPE(S_LABEL32_ST , 0x0209)
-SYMBOL_TYPE(S_CEXMODEL32 , 0x020a)
-SYMBOL_TYPE(S_VFTABLE32_16t , 0x020b)
-SYMBOL_TYPE(S_REGREL32_16t , 0x020c)
-SYMBOL_TYPE(S_LTHREAD32_16t , 0x020d)
-SYMBOL_TYPE(S_GTHREAD32_16t , 0x020e)
-SYMBOL_TYPE(S_SLINK32 , 0x020f)
-SYMBOL_TYPE(S_LPROCMIPS_16t , 0x0300)
-SYMBOL_TYPE(S_GPROCMIPS_16t , 0x0301)
-SYMBOL_TYPE(S_PROCREF_ST , 0x0400)
-SYMBOL_TYPE(S_DATAREF_ST , 0x0401)
-SYMBOL_TYPE(S_ALIGN , 0x0402)
-SYMBOL_TYPE(S_LPROCREF_ST , 0x0403)
-SYMBOL_TYPE(S_OEM , 0x0404)
-
-// All post 16 bit symbol types have the 0x1000 bit set.
-SYMBOL_TYPE(S_TI16_MAX , 0x1000)
-
-// Mostly unused "start" symbol types.
-SYMBOL_TYPE(S_REGISTER_ST , 0x1001)
-SYMBOL_TYPE(S_CONSTANT_ST , 0x1002)
-SYMBOL_TYPE(S_UDT_ST , 0x1003)
-SYMBOL_TYPE(S_COBOLUDT_ST , 0x1004)
-SYMBOL_TYPE(S_MANYREG_ST , 0x1005)
-SYMBOL_TYPE(S_BPREL32_ST , 0x1006)
-SYMBOL_TYPE(S_LDATA32_ST , 0x1007)
-SYMBOL_TYPE(S_GDATA32_ST , 0x1008)
-SYMBOL_TYPE(S_PUB32_ST , 0x1009)
-SYMBOL_TYPE(S_LPROC32_ST , 0x100a)
-SYMBOL_TYPE(S_GPROC32_ST , 0x100b)
-SYMBOL_TYPE(S_VFTABLE32 , 0x100c)
-SYMBOL_TYPE(S_REGREL32_ST , 0x100d)
-SYMBOL_TYPE(S_LTHREAD32_ST , 0x100e)
-SYMBOL_TYPE(S_GTHREAD32_ST , 0x100f)
-SYMBOL_TYPE(S_LPROCMIPS_ST , 0x1010)
-SYMBOL_TYPE(S_GPROCMIPS_ST , 0x1011)
-
-// Information about the frame layout of a procedure.
-SYMBOL_TYPE(S_FRAMEPROC , 0x1012)
-
-SYMBOL_TYPE(S_COMPILE2_ST , 0x1013)
-SYMBOL_TYPE(S_MANYREG2_ST , 0x1014)
-SYMBOL_TYPE(S_LPROCIA64_ST , 0x1015)
-SYMBOL_TYPE(S_GPROCIA64_ST , 0x1016)
-SYMBOL_TYPE(S_LOCALSLOT_ST , 0x1017)
-SYMBOL_TYPE(S_PARAMSLOT_ST , 0x1018)
-SYMBOL_TYPE(S_ANNOTATION , 0x1019)
-SYMBOL_TYPE(S_GMANPROC_ST , 0x101a)
-SYMBOL_TYPE(S_LMANPROC_ST , 0x101b)
-SYMBOL_TYPE(S_RESERVED1 , 0x101c)
-SYMBOL_TYPE(S_RESERVED2 , 0x101d)
-SYMBOL_TYPE(S_RESERVED3 , 0x101e)
-SYMBOL_TYPE(S_RESERVED4 , 0x101f)
-SYMBOL_TYPE(S_LMANDATA_ST , 0x1020)
-SYMBOL_TYPE(S_GMANDATA_ST , 0x1021)
-SYMBOL_TYPE(S_MANFRAMEREL_ST, 0x1022)
-SYMBOL_TYPE(S_MANREGISTER_ST, 0x1023)
-SYMBOL_TYPE(S_MANSLOT_ST , 0x1024)
-SYMBOL_TYPE(S_MANMANYREG_ST , 0x1025)
-SYMBOL_TYPE(S_MANREGREL_ST , 0x1026)
-SYMBOL_TYPE(S_MANMANYREG2_ST, 0x1027)
-SYMBOL_TYPE(S_MANTYPREF , 0x1028)
-SYMBOL_TYPE(S_UNAMESPACE_ST , 0x1029)
-
-// End of S_*_ST symbols, which do not appear to be generated by modern
-// compilers.
-SYMBOL_TYPE(S_ST_MAX , 0x1100)
-
-SYMBOL_TYPE(S_OBJNAME , 0x1101)
-SYMBOL_TYPE(S_THUNK32 , 0x1102)
-SYMBOL_TYPE(S_BLOCK32 , 0x1103)
-SYMBOL_TYPE(S_WITH32 , 0x1104)
-SYMBOL_TYPE(S_LABEL32 , 0x1105)
-SYMBOL_TYPE(S_REGISTER , 0x1106)
-SYMBOL_TYPE(S_CONSTANT , 0x1107)
-SYMBOL_TYPE(S_UDT , 0x1108)
-SYMBOL_TYPE(S_COBOLUDT , 0x1109)
-SYMBOL_TYPE(S_MANYREG , 0x110a)
-SYMBOL_TYPE(S_BPREL32 , 0x110b)
-SYMBOL_TYPE(S_LDATA32 , 0x110c)
-SYMBOL_TYPE(S_GDATA32 , 0x110d)
-SYMBOL_TYPE(S_PUB32 , 0x110e)
-SYMBOL_TYPE(S_LPROC32 , 0x110f)
-SYMBOL_TYPE(S_GPROC32 , 0x1110)
-SYMBOL_TYPE(S_REGREL32 , 0x1111)
-SYMBOL_TYPE(S_LTHREAD32 , 0x1112)
-SYMBOL_TYPE(S_GTHREAD32 , 0x1113)
-SYMBOL_TYPE(S_LPROCMIPS , 0x1114)
-SYMBOL_TYPE(S_GPROCMIPS , 0x1115)
-SYMBOL_TYPE(S_COMPILE2 , 0x1116)
-SYMBOL_TYPE(S_MANYREG2 , 0x1117)
-SYMBOL_TYPE(S_LPROCIA64 , 0x1118)
-SYMBOL_TYPE(S_GPROCIA64 , 0x1119)
-SYMBOL_TYPE(S_LOCALSLOT , 0x111a)
-SYMBOL_TYPE(S_PARAMSLOT , 0x111b)
-
-// Managed code symbols.
-SYMBOL_TYPE(S_LMANDATA , 0x111c)
-SYMBOL_TYPE(S_GMANDATA , 0x111d)
-SYMBOL_TYPE(S_MANFRAMEREL , 0x111e)
-SYMBOL_TYPE(S_MANREGISTER , 0x111f)
-SYMBOL_TYPE(S_MANSLOT , 0x1120)
-SYMBOL_TYPE(S_MANMANYREG , 0x1121)
-SYMBOL_TYPE(S_MANREGREL , 0x1122)
-SYMBOL_TYPE(S_MANMANYREG2 , 0x1123)
-SYMBOL_TYPE(S_UNAMESPACE , 0x1124)
-SYMBOL_TYPE(S_PROCREF , 0x1125)
-SYMBOL_TYPE(S_DATAREF , 0x1126)
-SYMBOL_TYPE(S_LPROCREF , 0x1127)
-SYMBOL_TYPE(S_ANNOTATIONREF , 0x1128)
-SYMBOL_TYPE(S_TOKENREF , 0x1129)
-SYMBOL_TYPE(S_GMANPROC , 0x112a)
-SYMBOL_TYPE(S_LMANPROC , 0x112b)
-SYMBOL_TYPE(S_TRAMPOLINE , 0x112c)
-SYMBOL_TYPE(S_MANCONSTANT , 0x112d)
-SYMBOL_TYPE(S_ATTR_FRAMEREL , 0x112e)
-SYMBOL_TYPE(S_ATTR_REGISTER , 0x112f)
-SYMBOL_TYPE(S_ATTR_REGREL , 0x1130)
-SYMBOL_TYPE(S_ATTR_MANYREG , 0x1131)
-
-
-SYMBOL_TYPE(S_SEPCODE , 0x1132)
-SYMBOL_TYPE(S_LOCAL_2005 , 0x1133)
-SYMBOL_TYPE(S_DEFRANGE_2005 , 0x1134)
-SYMBOL_TYPE(S_DEFRANGE2_2005, 0x1135)
-SYMBOL_TYPE(S_SECTION , 0x1136)
-SYMBOL_TYPE(S_COFFGROUP , 0x1137)
-SYMBOL_TYPE(S_EXPORT , 0x1138)
-SYMBOL_TYPE(S_CALLSITEINFO , 0x1139)
-SYMBOL_TYPE(S_FRAMECOOKIE , 0x113a)
-SYMBOL_TYPE(S_DISCARDED , 0x113b)
-SYMBOL_TYPE(S_COMPILE3 , 0x113c)
-SYMBOL_TYPE(S_ENVBLOCK , 0x113d)
-SYMBOL_TYPE(S_LOCAL , 0x113e)
-SYMBOL_TYPE(S_DEFRANGE , 0x113f)
-SYMBOL_TYPE(S_DEFRANGE_SUBFIELD, 0x1140)
-SYMBOL_TYPE(S_DEFRANGE_REGISTER, 0x1141)
-SYMBOL_TYPE(S_DEFRANGE_FRAMEPOINTER_REL, 0x1142)
-SYMBOL_TYPE(S_DEFRANGE_SUBFIELD_REGISTER, 0x1143)
-SYMBOL_TYPE(S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE, 0x1144)
-SYMBOL_TYPE(S_DEFRANGE_REGISTER_REL, 0x1145)
-
-// Current symbol types for most procedures as of this writing.
-SYMBOL_TYPE(S_LPROC32_ID , 0x1146)
-SYMBOL_TYPE(S_GPROC32_ID , 0x1147)
-SYMBOL_TYPE(S_LPROCMIPS_ID , 0x1148)
-SYMBOL_TYPE(S_GPROCMIPS_ID , 0x1149)
-SYMBOL_TYPE(S_LPROCIA64_ID , 0x114a)
-SYMBOL_TYPE(S_GPROCIA64_ID , 0x114b)
-
-SYMBOL_TYPE(S_BUILDINFO , 0x114c)
-
-// Inlined call site delimiters.
-SYMBOL_TYPE(S_INLINESITE , 0x114d)
-SYMBOL_TYPE(S_INLINESITE_END , 0x114e)
-
-// Procedure info end delimiter.
-SYMBOL_TYPE(S_PROC_ID_END , 0x114f)
-
-SYMBOL_TYPE(S_DEFRANGE_HLSL , 0x1150)
-SYMBOL_TYPE(S_GDATA_HLSL , 0x1151)
-SYMBOL_TYPE(S_LDATA_HLSL , 0x1152)
-SYMBOL_TYPE(S_FILESTATIC , 0x1153)
-SYMBOL_TYPE(S_LOCAL_DPC_GROUPSHARED, 0x1154)
-SYMBOL_TYPE(S_LPROC32_DPC , 0x1155)
-SYMBOL_TYPE(S_LPROC32_DPC_ID , 0x1156)
-SYMBOL_TYPE(S_DEFRANGE_DPC_PTR_TAG, 0x1157)
-SYMBOL_TYPE(S_DPC_SYM_TAG_MAP, 0x1158)
-SYMBOL_TYPE(S_ARMSWITCHTABLE , 0x1159)
-SYMBOL_TYPE(S_CALLEES , 0x115a)
-SYMBOL_TYPE(S_CALLERS , 0x115b)
-SYMBOL_TYPE(S_POGODATA , 0x115c)
-SYMBOL_TYPE(S_INLINESITE2 , 0x115d)
-SYMBOL_TYPE(S_HEAPALLOCSITE , 0x115e)
-SYMBOL_TYPE(S_MOD_TYPEREF , 0x115f)
-SYMBOL_TYPE(S_REF_MINIPDB , 0x1160)
-SYMBOL_TYPE(S_PDBMAP , 0x1161)
-SYMBOL_TYPE(S_GDATA_HLSL32 , 0x1162)
-SYMBOL_TYPE(S_LDATA_HLSL32 , 0x1163)
-SYMBOL_TYPE(S_GDATA_HLSL32_EX, 0x1164)
-SYMBOL_TYPE(S_LDATA_HLSL32_EX, 0x1165)
-
-#undef SYMBOL_TYPE
Modified: llvm/trunk/tools/llvm-readobj/CodeView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/CodeView.h?rev=257712&r1=257711&r2=257712&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/CodeView.h (original)
+++ llvm/trunk/tools/llvm-readobj/CodeView.h Wed Jan 13 17:44:57 2016
@@ -26,220 +26,9 @@
namespace llvm {
namespace codeview {
-/// A Symbols subsection is a sequence of SymRecords. Advancing by 'len'
-/// bytes will find the next SymRecord. These are the possible types of a
-/// record. Equivalent to SYM_ENUM_e in cvinfo.h.
-enum SymType : uint16_t {
-#define SYMBOL_TYPE(ename, value) ename = value,
-#include "CVSymbolTypes.def"
-};
-
-/// Generic record compatible with all symbol records.
-struct SymRecord {
- ulittle16_t RecordLength; // Record length, starting from the next field
- ulittle16_t RecordType; // Record type (SymType)
- // Symbol data follows.
-};
-
-/// Corresponds to the CV_PROCFLAGS bitfield.
-enum ProcFlags : uint8_t {
- HasFP = 1 << 0,
- HasIRET = 1 << 1,
- HasFRET = 1 << 2,
- IsNoReturn = 1 << 3,
- IsUnreachable = 1 << 4,
- HasCustomCallingConv = 1 << 5,
- IsNoInline = 1 << 6,
- HasOptimizedDebugInfo = 1 << 7,
-};
-
-// S_GPROC32, S_LPROC32, S_GPROC32_ID, S_LPROC32_ID, S_LPROC32_DPC or
-// S_LPROC32_DPC_ID
-struct ProcSym {
- ulittle32_t PtrParent;
- ulittle32_t PtrEnd;
- ulittle32_t PtrNext;
- ulittle32_t CodeSize;
- ulittle32_t DbgStart;
- ulittle32_t DbgEnd;
- TypeIndex FunctionType;
- ulittle32_t CodeOffset;
- ulittle16_t Segment;
- uint8_t Flags; // CV_PROCFLAGS
- // Name: The null-terminated name follows.
-};
-
-// S_INLINESITE
-struct InlineSiteSym {
- ulittle32_t PtrParent;
- ulittle32_t PtrEnd;
- TypeIndex Inlinee;
- // BinaryAnnotations
-};
-
-// S_LOCAL
-struct LocalSym {
- TypeIndex Type;
- ulittle16_t Flags;
- enum : uint16_t {
- IsParameter = 1 << 0,
- IsAddressTaken = 1 << 1,
- IsCompilerGenerated = 1 << 2,
- IsAggregate = 1 << 3,
- IsAggregated = 1 << 4,
- IsAliased = 1 << 5,
- IsAlias = 1 << 6,
- IsReturnValue = 1 << 7,
- IsOptimizedOut = 1 << 8,
- IsEnregisteredGlobal = 1 << 9,
- IsEnregisteredStatic = 1 << 10,
- };
- // Name: The null-terminated name follows.
-};
-
-// S_BLOCK32
-struct BlockSym {
- ulittle32_t PtrParent;
- ulittle32_t PtrEnd;
- ulittle32_t CodeSize;
- ulittle32_t CodeOffset;
- ulittle16_t Segment;
- // Name: The null-terminated name follows.
-};
-
-// S_LABEL32
-struct LabelSym {
- ulittle32_t CodeOffset;
- ulittle16_t Segment;
- uint8_t Flags; // CV_PROCFLAGS
- // Name: The null-terminated name follows.
-};
-
-// S_OBJNAME
-struct ObjNameSym {
- ulittle32_t Signature;
- // Name: The null-terminated name follows.
-};
-
-// S_COMPILE3
-struct CompileSym3 {
- ulittle32_t flags;
- uint8_t getLanguage() const { return flags & 0xff; }
- enum Flags : uint32_t {
- EC = 1 << 8,
- NoDbgInfo = 1 << 9,
- LTCG = 1 << 10,
- NoDataAlign = 1 << 11,
- ManagedPresent = 1 << 12,
- SecurityChecks = 1 << 13,
- HotPatch = 1 << 14,
- CVTCIL = 1 << 15,
- MSILModule = 1 << 16,
- Sdl = 1 << 17,
- PGO = 1 << 18,
- Exp = 1 << 19,
- };
- ulittle16_t Machine; // CPUType
- ulittle16_t VersionFrontendMajor;
- ulittle16_t VersionFrontendMinor;
- ulittle16_t VersionFrontendBuild;
- ulittle16_t VersionFrontendQFE;
- ulittle16_t VersionBackendMajor;
- ulittle16_t VersionBackendMinor;
- ulittle16_t VersionBackendBuild;
- ulittle16_t VersionBackendQFE;
- // VersionString: The null-terminated version string follows.
-};
-
-// S_FRAMEPROC
-struct FrameProcSym {
- ulittle32_t TotalFrameBytes;
- ulittle32_t PaddingFrameBytes;
- ulittle32_t OffsetToPadding;
- ulittle32_t BytesOfCalleeSavedRegisters;
- ulittle32_t OffsetOfExceptionHandler;
- ulittle16_t SectionIdOfExceptionHandler;
- ulittle32_t Flags;
-};
-
-// S_CALLSITEINFO
-struct CallSiteInfoSym {
- ulittle32_t CodeOffset;
- ulittle16_t Segment;
- ulittle16_t Reserved;
- TypeIndex Type;
-};
-
-// S_HEAPALLOCSITE
-struct HeapAllocationSiteSym {
- ulittle32_t CodeOffset;
- ulittle16_t Segment;
- ulittle16_t CallInstructionSize;
- TypeIndex Type;
-};
-
-// S_FRAMECOOKIE
-struct FrameCookieSym {
- ulittle32_t CodeOffset;
- ulittle16_t Register;
- ulittle16_t CookieKind;
-
- enum : uint16_t {
- Copy,
- XorStackPointer,
- XorFramePointer,
- XorR13,
- };
-};
-
-// S_UDT, S_COBOLUDT
-struct UDTSym {
- TypeIndex Type; // Type of the UDT
- // Name: The null-terminated name follows.
-};
-
-// S_BUILDINFO
-struct BuildInfoSym {
- ulittle32_t BuildId;
-};
-
-// S_BPREL32
-struct BPRelativeSym {
- ulittle32_t Offset; // Offset from the base pointer register
- TypeIndex Type; // Type of the variable
- // Name: The null-terminated name follows.
-};
-
-// S_REGREL32
-struct RegRelativeSym {
- ulittle32_t Offset; // Offset from the register
- TypeIndex Type; // Type of the variable
- ulittle16_t Register; // Register to which the variable is relative
- // Name: The null-terminated name follows.
-};
-
-// S_CONSTANT, S_MANCONSTANT
-struct ConstantSym {
- TypeIndex Type;
- // Value: The value of the constant.
- // Name: The null-terminated name follows.
-};
-
-// S_LDATA32, S_GDATA32, S_LMANDATA, S_GMANDATA
-struct DataSym {
- TypeIndex Type;
- ulittle32_t DataOffset;
- ulittle16_t Segment;
- // Name: The null-terminated name follows.
-};
-
-// S_LTHREAD32, S_GTHREAD32
-struct ThreadLocalDataSym {
- TypeIndex Type;
- ulittle32_t DataOffset;
- ulittle16_t Segment;
- // Name: The null-terminated name follows.
-};
+using llvm::support::little32_t;
+using llvm::support::ulittle16_t;
+using llvm::support::ulittle32_t;
/// Data in the the SUBSEC_FRAMEDATA subection.
struct FrameData {
@@ -262,19 +51,12 @@ struct FrameData {
//===----------------------------------------------------------------------===//
// On-disk representation of type information
-/// Indicates the kind of TypeRecord we're dealing with here. The documentation
-/// and headers talk about this as the "leaf" type.
-enum LeafType : uint16_t {
-#define LEAF_TYPE(name, val) name = val,
-#include "CVLeafTypes.def"
-};
-
// A CodeView type stream is a sequence of TypeRecords. Records larger than
// 65536 must chain on to a second record. Each TypeRecord is followed by one of
// the leaf types described below.
-struct TypeRecord {
+struct TypeRecordPrefix {
ulittle16_t Len; // Type record length, starting from &Leaf.
- ulittle16_t Leaf; // Type record kind (LeafType)
+ ulittle16_t Leaf; // Type record kind (TypeLeafKind)
};
// LF_TYPESERVER2
Modified: llvm/trunk/tools/llvm-readobj/StreamWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/StreamWriter.h?rev=257712&r1=257711&r2=257712&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/StreamWriter.h (original)
+++ llvm/trunk/tools/llvm-readobj/StreamWriter.h Wed Jan 13 17:44:57 2016
@@ -20,7 +20,6 @@
#include <algorithm>
using namespace llvm;
-using namespace llvm::support;
namespace llvm {
@@ -293,8 +292,9 @@ private:
};
template <>
-inline void StreamWriter::printHex<ulittle16_t>(StringRef Label,
- ulittle16_t Value) {
+inline void
+StreamWriter::printHex<support::ulittle16_t>(StringRef Label,
+ support::ulittle16_t Value) {
startLine() << Label << ": " << hex(Value) << "\n";
}
More information about the llvm-commits
mailing list