summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def2
-rw-r--r--llvm/include/llvm/DebugInfo/CodeView/CodeView.h12
-rw-r--r--llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h28
3 files changed, 41 insertions, 1 deletions
diff --git a/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def b/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def
index 556d0b85bde..6f08c711998 100644
--- a/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def
+++ b/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def
@@ -159,7 +159,6 @@ CV_SYMBOL(S_SEPCODE , 0x1132)
CV_SYMBOL(S_LOCAL_2005 , 0x1133)
CV_SYMBOL(S_DEFRANGE_2005 , 0x1134)
CV_SYMBOL(S_DEFRANGE2_2005, 0x1135)
-CV_SYMBOL(S_EXPORT , 0x1138)
CV_SYMBOL(S_DISCARDED , 0x113b)
// Current symbol types for most procedures as of this writing.
@@ -194,6 +193,7 @@ SYMBOL_RECORD(S_THUNK32 , 0x1102, Thunk32Sym)
SYMBOL_RECORD(S_TRAMPOLINE , 0x112c, TrampolineSym)
SYMBOL_RECORD(S_SECTION , 0x1136, SectionSym)
SYMBOL_RECORD(S_COFFGROUP , 0x1137, CoffGroupSym)
+SYMBOL_RECORD(S_EXPORT , 0x1138, ExportSym)
SYMBOL_RECORD(S_LPROC32 , 0x110f, ProcSym)
SYMBOL_RECORD_ALIAS(S_GPROC32 , 0x1110, GlobalProcSym, ProcSym)
diff --git a/llvm/include/llvm/DebugInfo/CodeView/CodeView.h b/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
index 399461b3545..19b3212b1f4 100644
--- a/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
+++ b/llvm/include/llvm/DebugInfo/CodeView/CodeView.h
@@ -417,6 +417,7 @@ enum class CompileSym2Flags : uint32_t {
CVTCIL = 1 << 15,
MSILModule = 1 << 16,
};
+CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(CompileSym2Flags)
/// Corresponds to COMPILESYM3::Flags bitfield.
enum class CompileSym3Flags : uint32_t {
@@ -433,6 +434,17 @@ enum class CompileSym3Flags : uint32_t {
PGO = 1 << 18,
Exp = 1 << 19,
};
+CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(CompileSym3Flags)
+
+enum class ExportFlags : uint16_t {
+ IsConstant = 1 << 0,
+ IsData = 1 << 1,
+ IsPrivate = 1 << 2,
+ HasNoName = 1 << 3,
+ HasExplicitOrdinal = 1 << 4,
+ IsForwarder = 1 << 5
+};
+CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ExportFlags)
// Corresponds to BinaryAnnotationOpcode enum.
enum class BinaryAnnotationsOpCode : uint32_t {
diff --git a/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h b/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h
index 1b1caa849d9..57c7628df73 100644
--- a/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h
+++ b/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h
@@ -983,6 +983,34 @@ public:
std::vector<StringRef> Fields;
};
+// S_EXPORT
+class ExportSym : public SymbolRecord {
+public:
+ struct Hdr {
+ ulittle16_t Ordinal;
+ ulittle16_t Flags; // ExportFlags
+ // Name: The null-terminated name follows.
+ };
+
+ ExportSym(uint32_t RecordOffset, const Hdr *H, StringRef Name)
+ : SymbolRecord(SymbolRecordKind::ExportSym), RecordOffset(RecordOffset),
+ Header(*H), Name(Name) {}
+
+ static ErrorOr<ExportSym> deserialize(SymbolRecordKind Kind,
+ uint32_t RecordOffset,
+ ArrayRef<uint8_t> &Data) {
+ const Hdr *H = nullptr;
+ StringRef Name;
+ CV_DESERIALIZE(Data, H, Name);
+
+ return ExportSym(RecordOffset, H, Name);
+ }
+
+ uint32_t RecordOffset;
+ Hdr Header;
+ StringRef Name;
+};
+
// S_FILESTATIC
class FileStaticSym : public SymbolRecord {
public:
OpenPOWER on IntegriCloud