
This patch replaces those occurrences of NoneType that would trigger an error if the definition of NoneType were missing in None.h. To keep this patch focused, I am deliberately not replacing None with std::nullopt in this patch or updating comments. They will be addressed in subsequent patches. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Differential Revision: https://reviews.llvm.org/D138539
15 lines
536 B
C++
15 lines
536 B
C++
//===- Optional.cpp - Optional values ---------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/ADT/Optional.h"
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
llvm::raw_ostream &llvm::operator<<(raw_ostream &OS, std::nullopt_t) {
|
|
return OS << "None";
|
|
}
|