[TextAPI] Remove redundant checking causing warnings. NFC.
authorMichael Liao <michael.hliao@gmail.com>
Tue, 24 Sep 2019 14:52:13 +0000 (14:52 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Tue, 24 Sep 2019 14:52:13 +0000 (14:52 +0000)
- Minor coding format.

llvm-svn: 372765

llvm/lib/TextAPI/MachO/TextStubCommon.cpp

index 806ca0324e10c321144a1042ce0433d5af6a778b..cfd9ac8d0cf6f56a053d04995747aa8864017749 100644 (file)
@@ -45,11 +45,11 @@ void ScalarTraits<PlatformSet>::output(const PlatformSet &Values, void *IO,
                                        raw_ostream &OS) {
 
   const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO);
-  assert((!Ctx || Ctx && Ctx->FileKind != FileType::Invalid) &&
+  assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
          "File type is not set in context");
 
-  if ( Ctx && Ctx->FileKind == TBD_V3 && Values.count(PlatformKind::macOS) &&
-      Values.count(PlatformKind::macCatalyst) ) {
+  if (Ctx && Ctx->FileKind == TBD_V3 && Values.count(PlatformKind::macOS) &&
+      Values.count(PlatformKind::macCatalyst)) {
     OS << "zippered";
     return;
   }
@@ -80,7 +80,7 @@ void ScalarTraits<PlatformSet>::output(const PlatformSet &Values, void *IO,
 StringRef ScalarTraits<PlatformSet>::input(StringRef Scalar, void *IO,
                                            PlatformSet &Values) {
   const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO);
-  assert((!Ctx || Ctx && Ctx->FileKind != FileType::Invalid) &&
+  assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
          "File type is not set in context");
 
   if (Scalar == "zippered") {