diff --git a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h index 3f7f8c7838fd1..efc8db12a6972 100644 --- a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h +++ b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h @@ -246,20 +246,17 @@ class LVObject { virtual void setName(StringRef ObjectName) {} LVElement *getParent() const { - assert((!Parent.Element || - (Parent.Element && static_cast(Parent.Element))) && + assert((!Parent.Element || static_cast(Parent.Element)) && "Invalid element"); return Parent.Element; } LVScope *getParentScope() const { - assert((!Parent.Scope || - (Parent.Scope && static_cast(Parent.Scope))) && + assert((!Parent.Scope || static_cast(Parent.Scope)) && "Invalid scope"); return Parent.Scope; } LVSymbol *getParentSymbol() const { - assert((!Parent.Symbol || - (Parent.Symbol && static_cast(Parent.Symbol))) && + assert((!Parent.Symbol || static_cast(Parent.Symbol)) && "Invalid symbol"); return Parent.Symbol; }