Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm] Add explicit visibility macros to YAMLTraits classes #111484

Merged
merged 2 commits into from
Nov 9, 2024
Merged
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
15 changes: 12 additions & 3 deletions llvm/include/llvm/Support/YAMLTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,15 @@ template <typename T> struct StdMapStringCustomMappingTraitsImpl {
LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL(type, true)

#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type) \
namespace llvm { \
namespace yaml { \
template <> struct LLVM_ABI MappingTraits<Type> { \
static void mapping(IO &IO, Type &Obj); \
}; \
} \
}

#define LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(Type) \
namespace llvm { \
namespace yaml { \
template <> struct MappingTraits<Type> { \
Expand All @@ -2090,7 +2099,7 @@ template <typename T> struct StdMapStringCustomMappingTraitsImpl {
#define LLVM_YAML_DECLARE_ENUM_TRAITS(Type) \
namespace llvm { \
namespace yaml { \
template <> struct ScalarEnumerationTraits<Type> { \
template <> struct LLVM_ABI ScalarEnumerationTraits<Type> { \
static void enumeration(IO &io, Type &Value); \
}; \
} \
Expand All @@ -2099,7 +2108,7 @@ template <typename T> struct StdMapStringCustomMappingTraitsImpl {
#define LLVM_YAML_DECLARE_BITSET_TRAITS(Type) \
namespace llvm { \
namespace yaml { \
template <> struct ScalarBitSetTraits<Type> { \
template <> struct LLVM_ABI ScalarBitSetTraits<Type> { \
static void bitset(IO &IO, Type &Options); \
}; \
} \
Expand All @@ -2108,7 +2117,7 @@ template <typename T> struct StdMapStringCustomMappingTraitsImpl {
#define LLVM_YAML_DECLARE_SCALAR_TRAITS(Type, MustQuote) \
namespace llvm { \
namespace yaml { \
template <> struct ScalarTraits<Type> { \
template <> struct LLVM_ABI ScalarTraits<Type> { \
static void output(const Type &Value, void *ctx, raw_ostream &Out); \
static StringRef input(StringRef Scalar, void *ctxt, Type &Value); \
static QuotingType mustQuote(StringRef) { return MustQuote; } \
Expand Down
22 changes: 11 additions & 11 deletions llvm/tools/llvm-pdbutil/PdbYaml.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ struct PdbObject {
}
}

LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::PdbObject)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::MSFHeaders)
LLVM_YAML_DECLARE_MAPPING_TRAITS(msf::SuperBlock)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::StreamBlockList)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::PdbInfoStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::PdbDbiStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::PdbTpiStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::PdbPublicsStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::NamedStreamMapping)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::PdbModiStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS(pdb::yaml::PdbDbiModuleInfo)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::PdbObject)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::MSFHeaders)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(msf::SuperBlock)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::StreamBlockList)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::PdbInfoStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::PdbDbiStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::PdbTpiStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::PdbPublicsStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::NamedStreamMapping)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::PdbModiStream)
LLVM_YAML_DECLARE_MAPPING_TRAITS_PRIVATE(pdb::yaml::PdbDbiModuleInfo)

#endif // LLVM_TOOLS_LLVMPDBDUMP_PDBYAML_H
Loading