diff options
author | Troy Butler <118708570+Troy-Butler@users.noreply.github.com> | 2024-04-19 12:36:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 09:36:08 -0700 |
commit | e6e931960b917e3a37f059a75d476966f572f787 (patch) | |
tree | ee59bc2e30d4aa53d0c47bc36c4b2ceedb04f452 | |
parent | 1b79a34a56378f5b75fb0abd03bb7029ea1c60ec (diff) | |
download | llvm-e6e931960b917e3a37f059a75d476966f572f787.zip llvm-e6e931960b917e3a37f059a75d476966f572f787.tar.gz llvm-e6e931960b917e3a37f059a75d476966f572f787.tar.bz2 |
[LLVM][TextAPI] Refactor Redundant Condition (#86542)
Fixes #83241
---------
Signed-off-by: Troy-Butler <squintik@outlook.com>
Co-authored-by: Troy-Butler <squintik@outlook.com>
-rw-r--r-- | llvm/lib/TextAPI/TextStub.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp index 0f74252..d903ba4 100644 --- a/llvm/lib/TextAPI/TextStub.cpp +++ b/llvm/lib/TextAPI/TextStub.cpp @@ -276,7 +276,7 @@ namespace yaml { template <> struct MappingTraits<ExportSection> { static void mapping(IO &IO, ExportSection &Section) { const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); - assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) && + assert((!Ctx || Ctx->FileKind != FileType::Invalid) && "File type is not set in YAML context"); IO.mapRequired("archs", Section.Architectures); @@ -298,7 +298,7 @@ template <> struct MappingTraits<ExportSection> { template <> struct MappingTraits<UndefinedSection> { static void mapping(IO &IO, UndefinedSection &Section) { const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); - assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) && + assert((!Ctx || Ctx->FileKind != FileType::Invalid) && "File type is not set in YAML context"); IO.mapRequired("archs", Section.Architectures); |