diff options
author | Alex Langford <alangford@apple.com> | 2024-02-17 12:11:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 12:11:10 -0800 |
commit | 164055f897c049543bd3e15548f891f823dc18b4 (patch) | |
tree | 633c03ad2d0b1dbf1bc0d855378bb8dd2d7c64c8 /llvm/unittests/Support/ErrorTest.cpp | |
parent | 21ddd7ff2b166c5e133b460b1a09ee8adb786ccd (diff) | |
download | llvm-164055f897c049543bd3e15548f891f823dc18b4.zip llvm-164055f897c049543bd3e15548f891f823dc18b4.tar.gz llvm-164055f897c049543bd3e15548f891f823dc18b4.tar.bz2 |
Revert "[Support] Introduce formatv variant of createStringError" (#82126)
Reverts llvm/llvm-project#80493
This increased clang compile times by 0.5%. I'll figure out a less
expensive way to achieve this.
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
-rw-r--r-- | llvm/unittests/Support/ErrorTest.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/unittests/Support/ErrorTest.cpp b/llvm/unittests/Support/ErrorTest.cpp index a700a50..11f9320 100644 --- a/llvm/unittests/Support/ErrorTest.cpp +++ b/llvm/unittests/Support/ErrorTest.cpp @@ -472,23 +472,6 @@ TEST(Error, createStringError) { << "Failed to convert createStringError() result to error_code."; } -TEST(Error, createStringErrorV) { - static llvm::StringRef Bar("bar"); - static const std::error_code EC = errc::invalid_argument; - std::string Msg; - raw_string_ostream S(Msg); - logAllUnhandledErrors(createStringErrorV(EC, "foo{0}{1}{2:x}", Bar, 1, 0xff), - S); - EXPECT_EQ(S.str(), "foobar10xff\n") - << "Unexpected createStringErrorV() log result"; - - S.flush(); - Msg.clear(); - auto Res = errorToErrorCode(createStringErrorV(EC, "foo{0}", Bar)); - EXPECT_EQ(Res, EC) - << "Failed to convert createStringErrorV() result to error_code."; -} - // Test that the ExitOnError utility works as expected. TEST(ErrorDeathTest, ExitOnError) { ExitOnError ExitOnErr; |