[libc-commits] [libc] 5d6ed9f - [libc][Obvious] Fix the build after e748db0f7f0971dc258c6631ae1fb0a38cfdf9dd.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Thu Dec 1 15:39:26 PST 2022
Author: Siva Chandra Reddy
Date: 2022-12-01T23:39:09Z
New Revision: 5d6ed9ff0c85530ed7f2d706cdcd0d942cb6abf1
URL: https://github.com/llvm/llvm-project/commit/5d6ed9ff0c85530ed7f2d706cdcd0d942cb6abf1
DIFF: https://github.com/llvm/llvm-project/commit/5d6ed9ff0c85530ed7f2d706cdcd0d942cb6abf1.diff
LOG: [libc][Obvious] Fix the build after e748db0f7f0971dc258c6631ae1fb0a38cfdf9dd.
That changed some parts of the Support API to use std::optional instead
of llvm::Optional. This patch updates the libc uses to the new API.
Added:
Modified:
libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
Removed:
################################################################################
diff --git a/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp b/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
index d43a92801f4f2..b0b2440fce69a 100644
--- a/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
+++ b/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp
@@ -70,7 +70,7 @@ class WrapperGenTest : public ::testing::Test {
using LlvmLibcWrapperGenTest = WrapperGenTest;
TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenAndGetNoErrors) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -92,7 +92,7 @@ TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenAndGetNoErrors) {
}
TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnStrlen) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -127,7 +127,7 @@ TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnStrlen) {
}
TEST_F(LlvmLibcWrapperGenTest, GenAliasForStrlen) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -163,7 +163,7 @@ TEST_F(LlvmLibcWrapperGenTest, GenAliasForStrlen) {
}
TEST_F(LlvmLibcWrapperGenTest, DeclStrlenAliasUsingMangledNameFile) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -216,7 +216,7 @@ TEST_F(LlvmLibcWrapperGenTest, DeclStrlenAliasUsingMangledNameFile) {
TEST_F(LlvmLibcWrapperGenTest,
RunWrapperGenOnStrlenWithMangledNameAndMangledNameFile) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -250,7 +250,7 @@ TEST_F(LlvmLibcWrapperGenTest,
}
TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnBadFuncName) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -282,7 +282,7 @@ TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnBadFuncName) {
}
TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnStrlenWithBadMangledNameFile) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
@@ -316,7 +316,7 @@ TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenOnStrlenWithBadMangledNameFile) {
}
TEST_F(LlvmLibcWrapperGenTest, RunWithMangledNameFileMissingLLVMLibcName) {
- llvm::Optional<llvm::StringRef> Redirects[] = {
+ std::optional<llvm::StringRef> Redirects[] = {
llvm::None, llvm::StringRef(STDOutFile.get().TmpName),
llvm::StringRef(STDErrFile.get().TmpName)};
More information about the libc-commits
mailing list