Index: llvm/lib/IR/AsmWriter.cpp =================================================================== --- llvm/lib/IR/AsmWriter.cpp +++ llvm/lib/IR/AsmWriter.cpp @@ -1931,10 +1931,9 @@ auto IsConstant = [&](Metadata *Bound) -> bool { if (auto *BE = dyn_cast_or_null(Bound)) { - return BE->isConstant() - ? DIExpression::SignedOrUnsignedConstant::SignedConstant == - *BE->isConstant() - : false; + return BE->isConstant() && + DIExpression::SignedOrUnsignedConstant::SignedConstant == + *BE->isConstant(); } return false; };