diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -4887,7 +4887,9 @@ bool isWrittenValueYetUndetermined() const { return !Content; } /// Return true if the value written cannot be determined at all. - bool isWrittenValueUnknown() const { return Content && !*Content; } + bool isWrittenValueUnknown() const { + return Content.has_value() && !*Content; + } /// Return the type associated with the access, if known. Type *getType() const { return Ty; }