Skip to content

Commit

Permalink
Remove conflicting definitions from libtapi YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
sbingner committed Jan 7, 2020
1 parent 043a234 commit 89295aa
Showing 1 changed file with 0 additions and 53 deletions.
53 changes: 0 additions & 53 deletions llvm/projects/tapi/lib/Core/YAML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@
namespace llvm {
namespace yaml {

using Impl = ScalarTraits<StringRef>;
void ScalarTraits<FlowStringRef>::output(const FlowStringRef &value, void *ctx,
raw_ostream &os) {
Impl::output(value, ctx, os);
}
StringRef ScalarTraits<FlowStringRef>::input(StringRef value, void *ctx,
FlowStringRef &out) {
return Impl::input(value, ctx, out.value);
}
QuotingType ScalarTraits<FlowStringRef>::mustQuote(StringRef name) {
return Impl::mustQuote(name);
}

using tapi::ObjCConstraint;
void ScalarEnumerationTraits<ObjCConstraint>::enumeration(
IO &io, ObjCConstraint &constraint) {
Expand Down Expand Up @@ -99,46 +86,6 @@ QuotingType ScalarTraits<PackedVersion>::mustQuote(StringRef) {
return QuotingType::None;
}

void ScalarTraits<SwiftVersion>::output(const SwiftVersion &value, void *,
raw_ostream &os) {
switch (value) {
case 1:
os << "1.0";
break;
case 2:
os << "1.1";
break;
case 3:
os << "2.0";
break;
case 4:
os << "3.0";
break;
default:
os << (unsigned)value;
break;
}
}
StringRef ScalarTraits<SwiftVersion>::input(StringRef scalar, void *,
SwiftVersion &value) {
value = StringSwitch<SwiftVersion>(scalar)
.Case("1.0", 1)
.Case("1.1", 2)
.Case("2.0", 3)
.Case("3.0", 4)
.Default(0);
if (value != SwiftVersion(0))
return {};

if (scalar.getAsInteger(10, value))
return "invalid Swift ABI version.";

return StringRef();
}
QuotingType ScalarTraits<SwiftVersion>::mustQuote(StringRef) {
return QuotingType::None;
}

using TAPI_INTERNAL::AvailabilityInfo;
void ScalarTraits<AvailabilityInfo>::output(const AvailabilityInfo &value,
void *, raw_ostream &os) {
Expand Down

0 comments on commit 89295aa

Please sign in to comment.