Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ClassRecord;
class EnumRecord;
class ModifierRecord;
class PointerRecord;
struct UnionRecord;
class UnionRecord;
} // namespace codeview
} // namespace llvm

Expand Down
14 changes: 14 additions & 0 deletions llvm/include/llvm/DebugInfo/CodeView/ContinuationRecordBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ class ContinuationRecordBuilder {

std::vector<CVType> end(TypeIndex Index);
};

// Needed by RandomAccessVisitorTest.cpp
#define TYPE_RECORD(EnumName, EnumVal, Name)
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD(EnumName, EnumVal, Name) \
extern template LLVM_TEMPLATE_ABI void \
ContinuationRecordBuilder::writeMemberType(Name##Record &Record);
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
#undef TYPE_RECORD
#undef TYPE_RECORD_ALIAS
#undef MEMBER_RECORD
#undef MEMBER_RECORD_ALIAS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would double check that this works with modular builds, this seems like it could cause some issues.


} // namespace codeview
} // namespace llvm

Expand Down
13 changes: 13 additions & 0 deletions llvm/include/llvm/DebugInfo/CodeView/SimpleTypeSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ class SimpleTypeSerializer {
ArrayRef<uint8_t> serialize(const FieldListRecord &Record) = delete;
};

// Needed by RandomAccessVisitorTest.cpp
#define TYPE_RECORD(EnumName, EnumVal, Name) \
class Name##Record; \
extern template LLVM_TEMPLATE_ABI ArrayRef<uint8_t> \
llvm::codeview::SimpleTypeSerializer::serialize(Name##Record &Record);
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD(EnumName, EnumVal, Name)
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
#undef TYPE_RECORD
#undef TYPE_RECORD_ALIAS
#undef MEMBER_RECORD
#undef MEMBER_RECORD_ALIAS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise

} // end namespace codeview
} // end namespace llvm

Expand Down
3 changes: 2 additions & 1 deletion llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,8 @@ class ClassRecord : public TagRecord {
};

// LF_UNION
struct UnionRecord : public TagRecord {
class UnionRecord : public TagRecord {
public:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change here? The use of struct should be fine. Or was it that there was a conflict with the declaration from the XMACRO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it wasn't usable in the XMACRO to forward declare classes used for the function declarations it creates

UnionRecord() = default;
explicit UnionRecord(TypeRecordKind Kind) : TagRecord(Kind) {}
UnionRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList,
Expand Down