Skip to content

Conversation

@Rajveer100
Copy link
Member

Resolves #90326

@llvmbot
Copy link
Member

llvmbot commented May 14, 2024

@llvm/pr-subscribers-debuginfo

Author: Rajveer Singh Bharadwaj (Rajveer100)

Changes

Resolves #90326


Full diff: https://github.com/llvm/llvm-project/pull/92111.diff

1 Files Affected:

  • (modified) llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h (+3-6)
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<LVElement *>(Parent.Element))) &&
+    assert((!Parent.Element || static_cast<LVElement *>(Parent.Element)) &&
            "Invalid element");
     return Parent.Element;
   }
   LVScope *getParentScope() const {
-    assert((!Parent.Scope ||
-            (Parent.Scope && static_cast<LVScope *>(Parent.Scope))) &&
+    assert((!Parent.Scope || static_cast<LVScope *>(Parent.Scope)) &&
            "Invalid scope");
     return Parent.Scope;
   }
   LVSymbol *getParentSymbol() const {
-    assert((!Parent.Symbol ||
-            (Parent.Symbol && static_cast<LVSymbol *>(Parent.Symbol))) &&
+    assert((!Parent.Symbol || static_cast<LVSymbol *>(Parent.Symbol)) &&
            "Invalid symbol");
     return Parent.Symbol;
   }

@Rajveer100
Copy link
Member Author

cc @JOE1994

@Rajveer100
Copy link
Member Author

Thanks for the approval! Could you land this for me?

@JOE1994 JOE1994 merged commit bed5546 into llvm:main May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h: 3 * redundant condition ?

3 participants