From b978c51ce4e99978ba526e7a5b69fe110dba396b Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Mon, 12 Aug 2019 23:01:07 +0000 Subject: [TextAPI] Fix & Add tests for tbd files version 3. - There was a simple typo in TextStub code that prevented version 3 files to be read. - Included a version 3 unit test to handle the differences in the format. - Also a typo in Error.h inside the comments. https://reviews.llvm.org/D66041 This patch is from Cyndy Ishida . llvm-svn: 368630 --- llvm/lib/TextAPI/MachO/TextStub.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/TextAPI/MachO/TextStub.cpp') diff --git a/llvm/lib/TextAPI/MachO/TextStub.cpp b/llvm/lib/TextAPI/MachO/TextStub.cpp index 799ebdc883a..d333024e698 100644 --- a/llvm/lib/TextAPI/MachO/TextStub.cpp +++ b/llvm/lib/TextAPI/MachO/TextStub.cpp @@ -534,9 +534,9 @@ template <> struct MappingTraits { // prope file type when reading. if (!IO.outputting()) { - if (IO.mapTag("!tapi-tbd-v2", false)) - Ctx->FileKind = FileType::TBD_V2; - else if (IO.mapTag("!tapi-tbd-v3", false)) + if (IO.mapTag("!tapi-tbd-v3", false)) + Ctx->FileKind = FileType::TBD_V3; + else if (IO.mapTag("!tapi-tbd-v2", false)) Ctx->FileKind = FileType::TBD_V2; else if (IO.mapTag("!tapi-tbd-v1", false) || IO.mapTag("tag:yaml.org,2002:map", false)) @@ -547,7 +547,7 @@ template <> struct MappingTraits { } } - // Set file tyoe when writing. + // Set file type when writing. if (IO.outputting()) { switch (Ctx->FileKind) { default: -- cgit v1.2.3