From e6e931960b917e3a37f059a75d476966f572f787 Mon Sep 17 00:00:00 2001 From: Troy Butler <118708570+Troy-Butler@users.noreply.github.com> Date: Fri, 19 Apr 2024 12:36:08 -0400 Subject: [LLVM][TextAPI] Refactor Redundant Condition (#86542) Fixes #83241 --------- Signed-off-by: Troy-Butler Co-authored-by: Troy-Butler --- llvm/lib/TextAPI/TextStub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/TextAPI/TextStub.cpp') 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 { static void mapping(IO &IO, ExportSection &Section) { const auto *Ctx = reinterpret_cast(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 { template <> struct MappingTraits { static void mapping(IO &IO, UndefinedSection &Section) { const auto *Ctx = reinterpret_cast(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); -- cgit v1.1