From: Siva Chandra Reddy Date: Thu, 1 Dec 2022 23:34:41 +0000 (+0000) Subject: [libc][Obvious] Fix the build after e748db0f7f0971dc258c6631ae1fb0a38cfdf9dd. X-Git-Tag: upstream/17.0.6~25655 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d6ed9ff0c85530ed7f2d706cdcd0d942cb6abf1;p=platform%2Fupstream%2Fllvm.git [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. --- diff --git a/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp b/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp index d43a928..b0b2440 100644 --- a/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp +++ b/libc/test/utils/tools/WrapperGen/wrappergen_test.cpp @@ -70,7 +70,7 @@ protected: using LlvmLibcWrapperGenTest = WrapperGenTest; TEST_F(LlvmLibcWrapperGenTest, RunWrapperGenAndGetNoErrors) { - llvm::Optional Redirects[] = { + std::optional 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 Redirects[] = { + std::optional 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 Redirects[] = { + std::optional 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 Redirects[] = { + std::optional 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 Redirects[] = { + std::optional 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 Redirects[] = { + std::optional 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 Redirects[] = { + std::optional 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 Redirects[] = { + std::optional Redirects[] = { llvm::None, llvm::StringRef(STDOutFile.get().TmpName), llvm::StringRef(STDErrFile.get().TmpName)};