summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TextAPI/MachO/TextStub.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@ributzka.de>2019-08-12 23:01:07 +0000
committerJuergen Ributzka <juergen@ributzka.de>2019-08-12 23:01:07 +0000
commitb978c51ce4e99978ba526e7a5b69fe110dba396b (patch)
treebb4f742cc2b7c5d9b512925f16dcca6f042bcb3b /llvm/lib/TextAPI/MachO/TextStub.cpp
parent3836874dbbf3840fb5286ae4336b29093eb0115e (diff)
downloadbcm5719-llvm-b978c51ce4e99978ba526e7a5b69fe110dba396b.tar.gz
bcm5719-llvm-b978c51ce4e99978ba526e7a5b69fe110dba396b.zip
[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 <cyndy_ishida@apple.com>. llvm-svn: 368630
Diffstat (limited to 'llvm/lib/TextAPI/MachO/TextStub.cpp')
-rw-r--r--llvm/lib/TextAPI/MachO/TextStub.cpp8
1 files changed, 4 insertions, 4 deletions
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<const InterfaceFile *> {
// 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<const InterfaceFile *> {
}
}
- // Set file tyoe when writing.
+ // Set file type when writing.
if (IO.outputting()) {
switch (Ctx->FileKind) {
default:
OpenPOWER on IntegriCloud