Skip to content

Commit bed5546

Browse files
authored
[DebugInfo] Get rid of redundant conditional checks in /DebugInfo (#92111)
Resolves #90326
1 parent b576a6b commit bed5546

File tree

1 file changed

+3
-6
lines changed
  • llvm/include/llvm/DebugInfo/LogicalView/Core

1 file changed

+3
-6
lines changed

llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,20 +246,17 @@ class LVObject {
246246
virtual void setName(StringRef ObjectName) {}
247247

248248
LVElement *getParent() const {
249-
assert((!Parent.Element ||
250-
(Parent.Element && static_cast<LVElement *>(Parent.Element))) &&
249+
assert((!Parent.Element || static_cast<LVElement *>(Parent.Element)) &&
251250
"Invalid element");
252251
return Parent.Element;
253252
}
254253
LVScope *getParentScope() const {
255-
assert((!Parent.Scope ||
256-
(Parent.Scope && static_cast<LVScope *>(Parent.Scope))) &&
254+
assert((!Parent.Scope || static_cast<LVScope *>(Parent.Scope)) &&
257255
"Invalid scope");
258256
return Parent.Scope;
259257
}
260258
LVSymbol *getParentSymbol() const {
261-
assert((!Parent.Symbol ||
262-
(Parent.Symbol && static_cast<LVSymbol *>(Parent.Symbol))) &&
259+
assert((!Parent.Symbol || static_cast<LVSymbol *>(Parent.Symbol)) &&
263260
"Invalid symbol");
264261
return Parent.Symbol;
265262
}

0 commit comments

Comments
 (0)