mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-25 12:04:36 +00:00
ModuleSummaryIndexYAML: Make a few fields optional to make it easier to write tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291307 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
17b59bf192
commit
64d3b81d23
@ -28,14 +28,14 @@ template <> struct ScalarEnumerationTraits<TypeTestResolution::Kind> {
|
||||
|
||||
template <> struct MappingTraits<TypeTestResolution> {
|
||||
static void mapping(IO &io, TypeTestResolution &res) {
|
||||
io.mapRequired("Kind", res.TheKind);
|
||||
io.mapRequired("SizeBitWidth", res.SizeBitWidth);
|
||||
io.mapOptional("Kind", res.TheKind);
|
||||
io.mapOptional("SizeBitWidth", res.SizeBitWidth);
|
||||
}
|
||||
};
|
||||
|
||||
template <> struct MappingTraits<TypeIdSummary> {
|
||||
static void mapping(IO &io, TypeIdSummary& summary) {
|
||||
io.mapRequired("TTRes", summary.TTRes);
|
||||
io.mapOptional("TTRes", summary.TTRes);
|
||||
}
|
||||
};
|
||||
|
||||
@ -53,7 +53,7 @@ namespace yaml {
|
||||
|
||||
template <> struct MappingTraits<FunctionSummaryYaml> {
|
||||
static void mapping(IO &io, FunctionSummaryYaml& summary) {
|
||||
io.mapRequired("TypeTests", summary.TypeTests);
|
||||
io.mapOptional("TypeTests", summary.TypeTests);
|
||||
}
|
||||
};
|
||||
|
||||
@ -100,8 +100,8 @@ template <> struct CustomMappingTraits<GlobalValueSummaryMapTy> {
|
||||
|
||||
template <> struct MappingTraits<ModuleSummaryIndex> {
|
||||
static void mapping(IO &io, ModuleSummaryIndex& index) {
|
||||
io.mapRequired("GlobalValueMap", index.GlobalValueMap);
|
||||
io.mapRequired("TypeIdMap", index.TypeIdMap);
|
||||
io.mapOptional("GlobalValueMap", index.GlobalValueMap);
|
||||
io.mapOptional("TypeIdMap", index.TypeIdMap);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user